Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Pastebin / Helper callback to get root category

function get_root_cat($code)
{
	global $structure;
	return mb_substr($structure['page'][$code]['path'], 0, mb_strpos($structure['page'][$code]['path'], '.'));
}

// Usage: {PHP.pag.page_cat|get_root_cat($this)}

Tags:

No tags