template parameter for a CATEGORY

Weppa333

Well-known member
Hello

This is my first message in XF1.2 :)

I would like to find a way to create a conditional, in a template, to know whether or not I'm in a CATEGORY, and the category name/ID

I found template parmas [forum][node_id] but it seems it is NOT filled up when inside a category.

I cannot find the right template parameter for a category. can anyone help ?
 
I'll try, It's not really in a page per-se, it's as a conditionnal for widgetframework that I'm trying to use it.
I basically want the widget to activate only when in a specific category
 
I can assure you that
<xen:if is="{$category.node_id} == 1">
This content will show in category 1
</xen:if>

never show on category 1, with category as pages activated.

Same with xen:container using another variable,
 
I can assure you it does, I have just tested it on my local to confirm.
I edited the category view template and added that very code.

category_view.webp

It shows in category 1 only and nowhere else.
 
Top Bottom