Forum

Thread tagged as: Problem, Addons

Updating Blog code for new Categories functionality from 2.6

I'm having a few problems with updating Blog to work with the new Categories functionality.

First issue is I've needed to re-publish all posts to get them to appear in their Achieve. Anyway to do a bulk re-publish on blog articles (like you can pages?)

Second issue is I was using the Cat Slug to add a class to a container within post_in_list.html template

Previous working code was:

<div class="<perch:blog id="category_slugs" />">

What I've updated it to the following which isn't working:

<div class="<perch:category id="catSlug" type="slug" />">

Anything obviously wrong here?

Many thanks!

Sarah Evans

Sarah Evans 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

To get the same as category_slugs, you'd need something like:

<perch:categories id="categories" set="blog"><perch:category id="catSlug" type="slug" /> </perch:categories>

Think I've sorted my second issue with:

<div class="<perch:categories id="categories" set="blog"><perch:category id="catSlug" type="slug" /></perch:categories>">

Let me know if I can tidy that up any better

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yup, looks good.

Thanks Drew, awesome support as always!

Anyway to batch re-publish blog posts?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Why do you need to republish them?

Posts aren't appearing on their archive category page until I've re-published.

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's surprising. You can try rerunning the update. Make a backup, then go to the following URL in your browser.

/perch/apps/addons/perch_blog/update/

Reinstalling so the update reran did the trick. Thanks Drew