PDA

View Full Version : Custom query for forums


frozt
10-28-2007, 03:46 PM
Hi.

I'm trying to set different layouts for the listing of all the forums. Some forums should be displayed in one way, the others in a different matter. But how do I change the $forumbits so that I can create custom templates and then call only the forums that belong to a certain parent?

Thanks in advance.
// Frozt

Gray Matter
10-28-2007, 10:24 PM
You could use template conditionals if you wanted to do it that way.

<if condition="$forum['forumid'] == X">
THIS CODE
<else />
ANOTHER CODE
</if>

frozt
10-29-2007, 04:16 PM
Thanks Gray Matter. That will do just fine. But in this case I need to filter by the forums parent ID, not the forums ID itself. Any ideas?

--------------- Added 1193702900 at 1193702900 ---------------

Oh, I found the function $foruminfo['parentid']. So I did the following:


<if condition="$foruminfo['parentid'] == 17">
Show forums like this
<else />
Show forums like this
</if>


But it doesn't work...