Forum
perch_categories on any page
I'm trying to get perch_categories();
to work on a particular page. Actually I'm trying to get a particular set of categories:
perch_categories([
'set'=>'platform',
]);
But it isn't finding anything. I tried a var_dump
but it's returning NULL
.
Is there a limitation as to which pages of a site I can call this function? I though it would've just output the categories wherever I asked it to, as it's not filtering any perch_content_custom
or perch_collection
content.
Thanks for keeping me right :)
What does debug output?
and
Nut sure why there are two, but they seem to be slightly different…
It looks like you're getting 5 categories back for that set - does that sound about right?
That's right – the set contains 5 categories
Ok, so it sounds like your template.
Have you tried
<perch:showall />
?Great stuff! I've found the problem. Broken template :D Thanks for your help and sorry to have been such a numpty ;P