What is the category name variable in Forum/item_action.tpl

Elise
Elise
@elise
8 years ago
249 posts
I would like to add the forum category name to the item action template, specifically to change this line

 <span class="action_item_title"><a href="{$item.action_item_url}" title="{$item.action_data.forum_title|jrCore_entity_string}">&quot;{$item.action_data.forum_title}&quot;</a><br>
    in {$item.action_data.CATEGORY_NAME???}</span>

Thanks!
updated by @elise: 03/11/17 05:43:43PM
michael
@michael
8 years ago
7,714 posts
Throw {debug} in that template and see what it says.

Docs: "{debug}"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/1477/debug

What I normally do is to name it something easy to find with ctrl+f like 'avacardo' so I know what ive found is what im after in the debug panel.
Elise
Elise
@elise
8 years ago
249 posts
ARG, I was trying to use fdebug (which now occurs to me does something different).
Thanks!
michael
@michael
8 years ago
7,714 posts
its there at:
{$item.action_data.forum_cat}
:)

Sometimes variables you want aren't available, in which case other steps are needed to get them there, but the one you're after is there.
Elise
Elise
@elise
8 years ago
249 posts
LOL, you made the same mistake I did.
It's actually $item.topic.forum_cat, not {$item.action_data.forum_cat}.

I thought it didn't work at first and saw the different array name for this bit.

Thanks!
Elise
Elise
@elise
8 years ago
249 posts
There's a bug in that file btw. It's printing the forum title url (when responding) instead of the title. Line 11

<span class="action_item_title"><a href="{$item.action_item_url}" title="{$item.topic.forum_title|jrCore_entity_string}">"{$item.topic.forum_title_url}"</a> in {$item.topic.forum_cat}</a></span>

should be
<span class="action_item_title"><a href="{$item.action_item_url}" title="{$item.topic.forum_title|jrCore_entity_string}">"{$item.topic.forum_title}"</a> in {$item.topic.forum_cat}</a></span>

updated by @elise: 12/05/16 03:21:37PM
michael
@michael
8 years ago
7,714 posts
nice catch. I'll get that fixed.

Tags