Forum
Filtering perch blog categories
Hi
you have a document on perch_blog_categories which says that you can toggle which categories you show on your site by adding a textbox to the category.html file.
Since you have move to a global category sets, this artilcle is no loner working.
the article says - <perch:blog id="visible" type="checkbox" value="1" label="Show on site" />
but this does not show in the blog categories, you need to add <perch:category id="visible" type="checkbox" value="1" label="Show on site" />
but when you try and filter by
<?php
perch_blog_categories(array(
'template' => 'category_link.html',
'filter' => 'visible',
'match' => 'eq',
'value' => '1',
));
?>
you get no categories at all.
How do i not show 1 category with perch_blog_categories
Regards,
Brett
Categories can't current be filtered that way. I didn't anticipate categories being used like that, so I'll need to switch them to use an index so they can be filtered.
Hi Drew
I will explain why. A few of my customers always want 1 news item to always be at the top of the list, i am sure there are a lot of way to do this but i normally use a category of "pin to top" and then use
so you always have the item you want at the top of the list.
The issue is when you use
you see the category - pin to top with a count of 1.
If there is an easier way of hiding a category can you let me know.
Regards,
Brett
I don't see a reason we can't implement this - I've logged it to look into.
Hi Drew
my site is live now so do you know when you may implement this?
Regards,
Brett
Yes, probably in Perch 2.9.
Thanks
Hi Drew
With the release of Blog 5.0 this question is probally redundant, now you can create a pin to top blog and use it to display the blog you want first.
and with being able to only output the categories of the main blog it has solved my issue.
and then only output the categories of the main blog.
Great update, well done...
Great stuff.