template parameter for a CATEGORY


Active member

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 ?


Active member
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


Active member
I can assure you that
<xen:if is="{$category.node_id} == 1">
This content will show in category 1

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

Same with xen:container using another variable,


XenForo moderator
Staff member
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.


It shows in category 1 only and nowhere else.