Category IF Statement not working

So I'm just trying a simple IF Statement - heres what I did for a test:





{if $category_id == '85'}


TESTING




{/if}

When clicking on category ID 85 and viewing source I don't see the H1 - if I remove the IF statement though then I do. Category ID is definitely 85 and I have tried clearing cache - any ideas why this may not work?

This IF statement is in top.tpl

I've also tried:





{if $category.category_id == '85'}

TESTING


{else}

TESTING 2


{/if}

Always shows the second, even when on category 85 :S

Think I've solved my own problem - for anyone else, the below seemed to work:





{if $category_data.category_id == '85'}

TESTING


{else}

TESTING 2


{/if}

you could always load the template debugger to grab those type of variables.



J.

Thanks - that’s what I ended up doing :).