GetMeta
string CMain::GetMeta( string id, string meta_name = false, bool bXhtmlStyle = true )
The method retrieves the page property decorated in the
Parameters
Parameter | Description | Available from version |
---|---|---|
id | Page property or section ID, which value will be displayed in the meta tag "content" attribute:
<meta content="value" ...> | |
meta_name | The meta tag "Name" attribute:
<meta name="meta_name" ...> Optional parameter. By default equals to the property_id value. | |
bXhtmlStyle | This parameter defines the standard of HTML tags. If true, the tags are displayed according to the XHTML standard (<meta />), otherwise, the HTML 4 standard is used (<meta>). This parameter was introduced in the kernel version 8.5.3. Optional, by default the value is true. | 8.5.3 |
See Also
Examples of use
<? $meta_keywords = $APPLICATION->GetMeta("keywords_prop", "keywords"); if (strlen($meta_keywords)>0) echo $meta_keywords; ?>
© «Bitrix24», 2001-2024