Monthly Archives: Listopad 2012

4 years, 5 months ago 0
Posted in: Programování

Create user defined tag with parameters named alias and param_name

if( !isset($params['alias']) ) {
	return;
}
if( !isset($params['param_name']) ) {
	return;
}
$gCms = cmsms();
$hierarchy_manager = $gCms->GetHierarchyManager();
$node = $hierarchy_manager->sureGetNodeByAlias($params['alias']);
$content = $node->getContent();
$property_value = $content->GetPropertyValue($params['param_name']);
if($property_value != "-1"){
	echo $property_value;
}