我的类别({PHP.c})有其代码 - 例如guide.cu或guide.us或story.cu等
通过这个函数我可以获得根类别
function get_root_cat($code)
{
return mb_substr($structure['page'][$code]['path'], 0, mb_strpos($structure['page'][$code]['path'], '.'));
}
因此,使用 {PHP.c|get_root_cat($this)} 我可以获得“指南”或“故事”等。
但现在结构变得更加复杂,{PHP.c} 看起来像guide.cu.one、guide.cu.two 或story.us. Three
我需要找到这个:指南。cu.one或故事。我们三人
慕桂英546537