2013-03-28, 10:48 PM
In the index, forums are grouped as a whole. {$forum['fid']} would have no logical value. I would honestly just go with the solution you have, it may be hacky, but I think there is no other way.
(2013-03-28, 10:48 PM)Seabody Wrote: [ -> ]In the index, forums are grouped as a whole. {$forum['fid']} would have no logical value. I would honestly just go with the solution you have, it may be hacky, but I think there is no other way.
Instead of this:
<script>
$("#forum-{$forum['fid']}").click()
{
// Hide the children
}
</script>
Do this:
<script>
$("#forum-1").click()
{
$("#forum-2").hide();
}
</script>
<a id="cat_{$forum['fid']}" href="javascript:;" class="forum-parent">{$forum['name']}</a>
<div class="child-forums" id="cat_{$forum['fid']}_e" style="{$expdisplay}">
<div class="forums-list">
{$sub_forums}
</div> <!-- /end forums-list -->
</div> <!-- /end child-forums -->
<span class="clear"></span>
<script>
$("#cat_{$forum['fid']}").click() {
$("#cat_{$forum['fid']}_e").hide();
}
</script>
<script>
$("#cat_11").click() {
$("#cat_14_e").hide();
$("#cat_12_e").hide();
}
</script>
(2013-03-30, 02:43 PM)LCTG Wrote: [ -> ]So, if I added new category. I need to modify this script right ?
Is there really no way to get {$forum['fid']} in index.php (index templates) or global.php (header, footer templates) ?
Any updates?