1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Remove the breadcrumbs from a specific node

Discussion in 'Template Modifications [Archive]' started by Brogan, Dec 8, 2010.

  1. Brogan

    Brogan XenForo Moderator Staff Member

    Many thanks to Indigo for coming up with the solution for this.

    This particular edit can be used if you want to set a Page as the home page.
    It works much better without the top and bottom breadcrumbs as it looks more like a static page, rather than part of the forum, which of course it still is.

    So the header, footer and styling all remain, just the breadcrumbs are removed.

    In the code below, change the 'node-55' for the actual node id of your page.
    You can check the node id in the ACP by clicking on the node title and it will be displayed in the URL.

    Open the PAGE_CONTAINER template and find this:
    HTML:
    <!-- top breadcrumb, top ctrl -->
    <div class="breadBoxTop">
    	<xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
    	<xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
    </div>
    Replace it with this:
    HTML:
    <!-- top breadcrumb, top ctrl -->
    <xen:if is="{$quickNavSelected} != 'node-55'">
    <div class="breadBoxTop">
    	<xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
    	<xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
    </div>
    </xen:if>

    Then find this:
    HTML:
    <div class="breadBoxBottom"><xen:include template="breadcrumb" /></div>
    Replace it with this:
    HTML:
    <xen:if is="{$quickNavSelected} != 'node-55'">
    <div class="breadBoxBottom"><xen:include template="breadcrumb" /></div>
    </xen:if>

    The end result is a page which looks like this:
    without_breadcrumbs.png

    Instead of this:
    with_breadcrumbs.png
     
    TrevC, ArnyVee, EQnoble and 3 others like this.
  2. arabic

    arabic Member

    Nice work thank you
     
  3. Brogan

    Brogan XenForo Moderator Staff Member

    Don't thank me, thank Indigo :)
     
    arabic likes this.
  4. arabic

    arabic Member

    Thank you,Indigo
    You are creative 244.gif
     
  5. Digital Doctor

    Digital Doctor Well-Known Member

    If you combine this breadcrumb removal with ....

    Assign Pages to Different Tabs
    You can have a Home Page ... with the Home Tab working as it should !

    Update: December 20, 2011 18:12 EST -
    For those wanting pages or forums assigned to Tabs ... use Jake's new Addon
    http://xenforo.com/community/threads/nodes-as-tabs-with-tab-selection.23295/
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    That's a lot of work just to get a new tab with focus....
     
  7. CFodder

    CFodder Well-Known Member

    How would you remove the breadcrumbs from the main index page?
     
    Creature likes this.
  8. masterchief

    masterchief Well-Known Member

    I want to remove breadcrumbs from multiple pages... how is this accomplished?
     
  9. GofD

    GofD Well-Known Member

    Same here. Tried adding the additional nodes in the code above,
    Code:
    <xen:if is="{$quickNavSelected} != 'node-55, node-137 '">
    with and without commas in between.

    Did you ever figure this out, masterchief? If not, can someone more well-versed than I comment on how best to do this on a multitude of pages? Thanks in advance!
     
    Veer likes this.
  10. dutchbb

    dutchbb Well-Known Member

    CFodder likes this.
  11. CFodder

    CFodder Well-Known Member

  12. masterchief

    masterchief Well-Known Member

  13. Digital Doctor

    Digital Doctor Well-Known Member

  14. masterchief

    masterchief Well-Known Member

    Simple solution.. I have set my external pages with this code which is learned from using Jaxel ultimate random header addon BTW...

    Code:
    
    <xen:container var="$quickNavSelected">crusaders</xen:container>
    
    
    All I need to do is place this code in the PAGE_CONTAINER template to test as conditional

    Code:
    
    <xen:if is="{$quickNavSelected} != 'crusaders">
    
    
    This code tests for multiple pages:

    Code:
    
    <xen:if is="!in_array({$quickNavSelected}, array('comics','tos'))">
    
    
     
    TrevC, Eagle, ArnyVee and 1 other person like this.
  15. ArnyVee

    ArnyVee Well-Known Member

    I'm creating several 'static' informational pages and would like to remove the breadcrumbs from each. Are Brogan's instructions still the way to go or is there an updated manner in which to remove the breadcrumbs?

    EDITED: Looks like Brogan's code works fine :)

    Also, I'd like to remove them from all of the pages, so hopefully the solution will allow for multiple nodes to be included.

    EDITED: Looks like MasterChief's code worked too :)

    HTML:
    <xen:if is="!in_array({$quickNavSelected}, array('node-XX','node-XX'))">
    Just make sure to change the "XX" to your node #. :)
     
  16. Hyperion

    Hyperion Active Member

    Is it practical to remove breadcrumbs from a single topic, or am I being excessively silly?
     
  17. Brogan

    Brogan XenForo Moderator Staff Member

    Just move that FAQ thread into a page already ;)
     
  18. Hyperion

    Hyperion Active Member

    Hahaha. Heh. I am stubborn. Or rather that Nodes as Tabs guy told me how to turn a topic into a highlight-able tab and it has emboldened me to remove breadcrumbs from it now. :D
     
  19. Hyperion

    Hyperion Active Member

    Hi, Brogan. Used the Conditionals from the Main FAQ you put together to figure out how to do this:

    Code:
    <xen:if is="{$forum.node_id} !== 75">
                            <div class="breadBoxTop">
                                <xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
                                <xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
                            </div>
    </xen:if>
    Code:
    <xen:if is="{$forum.node_id} !== 75">
                <div class="breadBoxBottom"><xen:include template="breadcrumb" /></div>
    </xen:if>
    Result: http://theinfinityprogram.com/index.php?threads/faq-nsfaq.4275/
    And only in that forum/topic.

    tumblr_lp9z0hIDjP1qhnxnd.gif

    In yo face!
     
    Digital Doctor likes this.

Share This Page