Documentation

GetPageProperty

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

The method returns the value of a property for a current page. Doesn't work in delayed changes mode, meaning that values set in components won't be visible. Use ShowProperty to show in template. Non-static method.

Parameters

ParameterDescription Available from version
property_id Property ID.
default_value Property default value.
Optional parameter. The default value is false, which means no default value is assigned.

See Also

  • CMain::ShowProperty
  • CMain::GetProperty
  • CMain::GetDirProperty
  • CMain::GetPagePropertyList
  • CMain::GetDirPropertyList
  • CMain::SetPageProperty
  • CMain::SetDirProperty

    Examples of use

    <? 
    echo $APPLICATION->GetPageProperty("keywords"); 
    ?>


  • © «Bitrix24», 2001-2024