The Easter Sale is on! Join now or renew your subscription with a 25% OFF! Read More

Support Forum

Tim
Tim
Offline
Hello,

I am using the Top News (Joomla) particle for a new site and would like to know how to modify the “top-news-joomla.html.twig” file so that only the direct category is shown. I have an article within a nested category structure and all category levels are shown in the particle on the front-end. I would like to see only the one category “tag” form the direct category the article was posted in.

(See attached screenshot)

Also, it would be great to include the category ID of the article within the < span > for the category tag as a class to allow individual customization of the background color for the tags so that each category has its own color (This is very important for this website)

Currently:

<a href="/sections/lifestyle/culture">
<span>Culture</span>
</a>


Desired:

<a href="/sections/lifestyle/culture">
<span class=”someclass-category-id”>Culture</span>
</a>


It would be great if someone could point me to the right way of approaching this!

Thank you,
Attachments:
Responses (7)
Sorry, but you are not allowed to view the replies here.
Your Reply

Become an insider | Subscribe to our Newsletter
Subscribe to our mailing list and stay up-to-date with all our awesome releases, latest updates and amazing discount offers!