I am writing a UDT that traverses the page hierarchy from the page it's on, and I want to get the value of the custom content block data. This must be easy to do but I have not been able to find the right object method or function I need online and it doesn't seem too obvious. The code I want to use is like like:
Code: Select all
$thisPage = $gCms->variables['content_id'];
$currentNode = &$manager->sureGetNodeById($thisPage);
while( isset($currentNode) && ($level=$currentNode->getLevel()) >= 0 )
{
$pData = $currentNode->GetPropertyValue['my_page_data']; // This method does not seem to work
if(strlen($pData)) {
if(strlen($data)) $data.= ",";
$data.= $pData ;
}
$currentNode =& $currentNode->getParentNode();
}
Thanks,
Neil