Documentation

GetPublicViewHTML

string
CIBlockProperty*::GetPublicViewHTML(
array arProperty,
array value,
array strHTMLControlName
);

The method must return safe HTML to show property value in the site public section. When returns empty value, it won't be displayed. Method is static when using standard properties. Must be static for properties, created by client when using php7.

Note: the method is called from the method CIBlockFormatProperties::GetDisplayValue, which is used by the iblock module components for property value formatting.

Call parameters

Parameter Description
arProperty
Property metadata. See Structure for Iblock Module Tables
valueProperty value. Array type:
array(
"VALUE" => value,
);
strHTMLControlNameEmpty array.

Returned value

String.

See Also

Examples

<?
class CIBlockPropertyMyDateTime
{
function GetPublicViewHTML($arProperty, $value, $strHTMLControlName)
{
if(strlen($value["VALUE"])>0)
return str_replace(" ", "&nbsp;", htmlspecialcharsex($value["VALUE"]));
else
return '';
}
}
?>


© «Bitrix24», 2001-2022
Up