mutus123
11-11-2005, 10:17 PM
What am I missing here? All I want to do is add a conditional on FORUMHOME, so that one certain forum does not display regular forum bits, but rather some custom markup. I thought it would be a breeze.
In forumhome_forumbit_level1_nopost, I want to change this
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
$childforumbits
</tbody>
to this
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
<if condition="$forum[forumid] == 46">
$my_custom_var
<else />
$childforumbits
</if>
</tbody>
The problem is that no matter where I attempt to define $my_custom_var, the template will never recognize it. I have tried every hook imaginable, and also tried to define it directly in index.php, global.php, and init.php. Nothing works.
I'm sure I have the problem isolated to $my_custom_var because this works as expected...
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
<if condition="$forum[forumid] == 46">
Print custom text here.
<else />
$childforumbits
</if>
</tbody>
In addition, I assigned some custom text to a known recognized variable ($show) and that also works as expected...
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
<if condition="$forum[forumid] == 46">
$show[my_custom_var]
<else />
$childforumbits
</if>
</tbody>
Of course, I don't want to, and shouldn't have to dump a big chunk of markup into the $show array. Do I need to register my custom variable somewhere so it gets recognized? Again, I have tried all the hooks, I have tried direct file edits. I have used DEVDEBUG (which annoyingly spits out the expected variable :ermm: ).... yet it just refuses to get recognized by that template. Now I'm aggravated. I been lurking here for years and always found my answers by searching. Aaaaaggghh ;)
Can anyone please fill me in on what I'm missing here?
In forumhome_forumbit_level1_nopost, I want to change this
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
$childforumbits
</tbody>
to this
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
<if condition="$forum[forumid] == 46">
$my_custom_var
<else />
$childforumbits
</if>
</tbody>
The problem is that no matter where I attempt to define $my_custom_var, the template will never recognize it. I have tried every hook imaginable, and also tried to define it directly in index.php, global.php, and init.php. Nothing works.
I'm sure I have the problem isolated to $my_custom_var because this works as expected...
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
<if condition="$forum[forumid] == 46">
Print custom text here.
<else />
$childforumbits
</if>
</tbody>
In addition, I assigned some custom text to a known recognized variable ($show) and that also works as expected...
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
<if condition="$forum[forumid] == 46">
$show[my_custom_var]
<else />
$childforumbits
</if>
</tbody>
Of course, I don't want to, and shouldn't have to dump a big chunk of markup into the $show array. Do I need to register my custom variable somewhere so it gets recognized? Again, I have tried all the hooks, I have tried direct file edits. I have used DEVDEBUG (which annoyingly spits out the expected variable :ermm: ).... yet it just refuses to get recognized by that template. Now I'm aggravated. I been lurking here for years and always found my answers by searching. Aaaaaggghh ;)
Can anyone please fill me in on what I'm missing here?