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

XF 1.3 Nav bar links footer links

Discussion in 'Styling and Customization Questions' started by Mucker15, Feb 13, 2014.

  1. Mucker15

    Mucker15 Member

    I'd like to ad a few links to my Navbar and my footer
    Can anyone give me some simple directions I'm a total novice

    Thnx
     
  2. Amaury

    Amaury Well-Known Member

    Edit the navigation and footer templates.
     
  3. Mucker15

    Mucker15 Member

    <xen:hook name="ad_below_bottom_breadcrumb" />
    Do I enter the code in between the " " ?

    That was for ads sorry
     
  4. oman

    oman Well-Known Member

    The most automated and easy way to go with the nav bar would be the nodes as tabs add on: http://xenforo.com/community/resources/nodes-as-tabs.9/

    For the footer, you would have to make modifications to the footer template.
     
    Amaury likes this.
  5. Mucker15

    Mucker15 Member

    Thats the problem I have no idea how to do so
     
  6. oman

    oman Well-Known Member

    This part of the footer template should help:

    Code:
                <xen:hook name="footer_links">
                    <xen:if is="{$xenOptions.contactUrl.type} === 'default'">
                        <li><a href="{xen:link 'misc/contact'}" class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}">{xen:phrase contact_us}</a></li>
                    <xen:elseif is="{$xenOptions.contactUrl.type} === 'custom'" />
                        <li><a href="{$xenOptions.contactUrl.custom}" {xen:if {$xenOptions.contactUrl.overlay}, 'class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}"'}>{xen:phrase contact_us}</a></li>
                    </xen:if>
                    <li><a href="{xen:link help}">{xen:phrase help}</a></li>
                    <xen:if is="{$homeLink}"><li><a href="{$homeLink}" class="homeLink">{xen:phrase home}</a></li></xen:if>
                    <li><a href="{$requestPaths.requestUri}#navigation" class="topLink">{xen:phrase go_to_top}</a></li>
                    <li><a href="{xen:link forums/-/index.rss}" rel="alternate" class="globalFeed" target="_blank"
                        title="{xen:phrase rss_feed_for_x, 'title={$xenOptions.boardTitle}'}">{xen:phrase rss}</a></li>
                </xen:hook>
    You'll see the links there like home, top, etc. You should just be able to add your links basing it off that code.
     
    Amaury and tajhay like this.
  7. Mucker15

    Mucker15 Member

    Thanks ill try messing with it
     
  8. oman

    oman Well-Known Member

    Custom link:

    Code:
                    <li><a href="url goes here">Name of your link</a></li>
    Add that where you want it within the <xen:hook> tags
     
    Amaury likes this.
  9. oman

    oman Well-Known Member

    @Mucker15 , after playing around I managed to add a simple link to the footer after the 'Top' link.

    Rather than manually editing the template, I did an automatic template modification:

    Find:

    Code:
    <li><a href="{$requestPaths.requestUri}#navigation" class="topLink">{xen:phrase go_to_top}</a></li>
    Replace:

    Code:
    <li><a href="{$requestPaths.requestUri}#navigation" class="topLink">{xen:phrase go_to_top}</a></li>
                    <li><a href="http://test.com/">Custom Link</a></li>
    End result:

    footerlink.png
     
    rafass and Amaury like this.
  10. Mucker15

    Mucker15 Member

    Thank you I Was able to add the link to the footer
     
  11. pfernand

    pfernand Member

    Thanks! Just what I was looking for :)
     

Share This Page