Forum

Thread tagged as: Question, Runway, Blog

Using count.blog.post for specific blog when using multiple blogs

Hi,

I've now managed to set up multiple blogs with their own specific archive templates and link templates, but when using count.blog.post on the link templates I'm getting quantities for across the entire blog app. Can you advise me how to only count from a specific blog slug?

So for example my category_link_news.html template points only to an archive page filtering content for the news blog, but the count is showing across all blogs. My template content is:

<perch:before>
<h3>Categories</h3>
<ul>
</perch:before>
    <li><a href="https://mywebsite.co.uk/more/news/archive/category/<perch:category id="catSlug" />"><perch:category id="catTitle" /> (<perch:category id="count.blog.post" when-empty="0" />)</a></li>
<perch:after></ul></perch:after>

I wasn't sure if there's something like count.blog.news.post (I tried this and clearly doesn't work!!)

Thanks!

Alex Bennett

Alex Bennett 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I don't think we maintain counts for specific blogs.

Okay - no probs, probably best to remove them in this case!