1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to add Forum Links tothe dropdown list for the Forums Tab

Discussion in 'XenForo Questions and Support' started by Lone Wolf, Mar 9, 2012.

  1. Lone Wolf

    Lone Wolf Well-Known Member

    My users would rather have dropdown options for the different forums rather than use the jump menu.

    I'd like to use the dropdown list for the 'forums' tab to include a link to all the other forums.

    If I could base this on permissions then that would be perfect but if I cant then just a list of the basic forums will do just as well.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Lone Wolf likes this.
  3. Lone Wolf

    Lone Wolf Well-Known Member

    I already use that Jake.

    I was looking for a template edit. It should be fairly simple to just add more lines to the sublinks in the templates. It's just that I dont know what hooks, etc I need to use.
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  5. Lone Wolf

    Lone Wolf Well-Known Member

    Thanks Jake.

    Now if I want to create one of these links to show 'main forum' to those users who have permissions to see it. Then how would I go about that. How do I change the following line to reflect that...

    Code:
    <xen:if is="{$canSearch}"><li><a href="{xen:link search, '', 'type=post'}">{xen:Phrase search_forums}</a></li></xen:if>
    Eg the line Im looking for would be something like

    Code:
    <xen:if is="{$canView}"><li><a href="{xen:link 'main_forum'}">{xen:Phrase Main Forum}</a></li></xen:if>
    Now I know the above phrases and links arent correct. I just want to know what phrases/links I should be using to make this work and whether I need to create new Phrases for each Forum I want to link to. which I guess I do.
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    There is no condition you can use to check that permission. That would require an addon. Otherwise the forum link will show for everyone, and if you don't have permission it will tell you so when you try to click it.
     
    Lone Wolf likes this.
  7. Lone Wolf

    Lone Wolf Well-Known Member

    Ok no problem. Do I have to use the forum url or can i specify the forum ID?

    Eg instead of..

    Xen Link - 'view/mainforum.5' : Xen Phrase main_forum

    How do I use the forum ID like this..

    Xen Link - 'forumid, 5' : Xen Phrase main_forum
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Code:
    {xen:link forums, {xen:array 'node_id=2', 'title=Main Forum'}}
    
     
  9. Lone Wolf

    Lone Wolf Well-Known Member

    Also do you know how to change the styling of the heading text of the sublinks. I'd like to have some in bold and others just regular, this is in order to distinguish actual forums from 'watched threads' and 'whats new'

    Plus do you know how to put a blank placeholder in the sublinks area in order to seperate actual forums from other links
     
  10. Lone Wolf

    Lone Wolf Well-Known Member

    Never mind, just saw the html tags text
     
  11. Lone Wolf

    Lone Wolf Well-Known Member

    Ok I got this working, thanks once again for your invaluable help Jake
     

Share This Page