Forum

Thread tagged as: Question, Blog

Display categories for that post in template

Hi, I would like to display category name inside a template, and this snippet is not working...

<perch:categories id="categories" set="blog" label="Tipo de album" />

Inside template:

<li class='grid-item <perch:categories id="categories" set="blog" label="Tipo de album" />'>
    <a href='o.php?s=<perch:blog id="postSlug" />'>
        <img src='<perch:blog id="portada" type="image" label="Imagen de portada" help="Reduce a 400px x 400px" width="400px" height="400px" crop="true" />' alt='<perch:blog id="postTitle" />' onload="slideLoaded(this)" />
        <h3><perch:blog id="postTitle" /></h3>
    </a>
</li>
Raul Serrano

Raul Serrano 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

perch:categories is not an empty tag

<perch:categories id="categories" set="blog" label="Tipo de album">
    <perch:category id="catTitle" />
</perch:categories>