vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Display a List of forum sections (https://vborg.vbsupport.ru/showthread.php?t=318352)

tamsin 04-21-2015 12:56 PM

Display a List of forum sections
 
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:

Code:

<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.

kh99 04-22-2015 02:08 PM

Quote:

Originally Posted by tamsin (Post 2543866)
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

Quote:

Originally Posted by kh99 (Post 2543868)
Try checking $data['forum']['depth'].

Brilliant, it works, thank you so much, that's been bugging me all afternoon!


All times are GMT. The time now is 01:09 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01014 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete