Bitrix Site Manager

CMain::GetProperty

string
CMain::GetProperty(
 string property_id,
 mixed default_value = false
)

The method GetProperty returns the property value of the current page or section. If the page does not have the required property, the method searches for the one in parent sections recursively.

Parameters

ParameterDescription
property_id Identifier of the page or section property whose value is to be returned.
default_value Default value of the property.
Optional; the default value is false which means no default value is assigned.

See Also

Example



<?
$keywords = $APPLICATION->GetProperty("keywords");
if (strlen($keywords)>0) echo $keywords;
?>