View Full Version : Display a List of forum sections
tamsin
04-21-2015, 12:56 PM
I'd like to write a simple list of forum section names and links to use as navigation e.g.
<ul>
<li><a href="forumdisplay.php?30-section-one">Section One</a></li>
<li><a href="forumdisplay.php?31-section-two">Section Two</a></li>
</ul>
Any advice on how to do that? It would need to take into account which sections a user has permission to see.
Thank you :)
Black Snow
04-21-2015, 01:40 PM
Where do you want these links to be shown? If it is in the nav bar, you can do that with the navigation manager in the AdminCp
tamsin
04-22-2015, 01:58 PM
I'm trying to add a drop down menu with the forum sections to the mobile template.
I think I've got half way there by copying the code from the quick links at the bottom of the desktop:
<ul>
<vb:each from="jumpforumbits" value="data">
<vb:if condition="$data['type'] == 'link'">
<li><a href="{vb:link forum, {vb:raw data.forum}}">{vb:raw data.forum.title_clean}</a></li>
</vb:if>
</vb:each>
</ul>
I'd like to exclude the sub forums though, there seems to be a data.forum.depth value which I can write to the screen, but I can't work out how to check it it the if statement... <vb:if condition="$data['depth'] == 1"> doesn't work.
I'd like to exclude the sub forums though, there seems to be a data.forum.depth value which I can write to the screen, but I can't work out how to check it it the if statement... <vb:if condition="$data['depth'] == 1"> doesn't work.
Try checking $data['forum']['depth'].
tamsin
04-22-2015, 02:31 PM
Try checking $data['forum']['depth'].
Brilliant, it works, thank you so much, that's been bugging me all afternoon!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.