Bitrix Site Manager

CPageOption::SetOptionString

bool
CPageOption::SetOptionString(
 string module_id,
 string page_option_id,
 string value = ""
)

The SetOptionString method sets the string value of the parameter page_option_id for the module_id. Returns true on success, or false otherwise.

Parameters

Parameter Description
module_id Module ID.
page_option_id A page parameter ID.
value Parameter value.
Optional. Empty by default.

See Also

Example



<?
// The example shows how to prohibit storing the number of the last page in session,
// with standard pagewise navigation.
// The last open page of pagewise navigation is remembered in session by default. 
// If you want to change this behavior for the current page, 
// use the following code before CDBResult::NavPrint:
CPageOption::SetOptionString("main", "nav_page_in_session", "N")

// To restore the default mode:
CPageOption::SetOptionString("main", "nav_page_in_session", "Y");
?>