How to target last active category in the shop URL?

TradingboTradingbo Posts: 20Member

Hi Support,

I'm working on a way to display sub category links within their parent cats on the collections page.

Im using:

{% if category.url is active %}

However this also targets the parents of a category as that URL is also active in the Domain URL when user is within a sub-category

Is their a way to target only the last active category in the shop URL?

E.g. URL = /showroom/indian-furniture/furniture-type/ only want to target /furniture-type/

{% if category.url is last.active %}

Answers

  • TradingboTradingbo Posts: 20Member

    Or simply a better way to target the currently active collection or category aside from using the URL?

  • TradingboTradingbo Posts: 20Member

    Hi Support, any thoughts here...

    Is there a way to return which single category a user is currently viewing?

Sign In or Register to comment.