HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


No show breadcrumbs in site

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#103189 (In Topic #20206)
Avatar

Fan in action

Hi, I promise I looked through documentation and used contextual tools! but I still need help finding out how to disable the breadcrumbs readout in the top right above the title, when viewing my site. To make it look cleaner, it's a simple site with no depth for users to get lost in the pages. Thanks
Back to the top
 
Posted
Rating:
#103190
Avatar

Community saint

I don't think this will remove all breadcrumbs from all areas, but the main breadcrumb can be removed from the global HTML wrap template. In GLOBAL_HTML_WRAP.tpl, find and remove these lines:

Code


{+START,IF,{$IN_STR,{$BREADCRUMBS},<a}}{+START,IF,{$SHOW_HEADER}}
<nav class="global_breadcrumbs breadcrumbs" itemprop="breadcrumb" role="navigation">
<img class="breadcrumbs_img" src="{$IMG*,breadcrumbs}" title="{!YOU_ARE_HERE}" alt="{!YOU_ARE_HERE}" />
{$BREADCRUMBS}
</nav>
{+END}{+END}


Be sure to use the template editor for your theme so ocPortal creates a proper override for the template. Or if manually editing the template file, be sure you don't edit the template in the themes\default\templates directory, make a copy of it in the themes\<your site theme>\templates_custom directory (or the themes\default\templates_custom directory if using the default theme) and manually edit it from there.

It may not be advisable to remove the breadcrumbs from the mobile template without being sure it won't adversely affect site navigation on mobile platforms. If you don't think it will hurt navigation and you want to remove it for mobile users, you can make a similar edit to the GLOBAL_HTML_WRAP_mobile.tpl template by finding and removing these lines:

Code


{+START,IF_NON_EMPTY,{$BREADCRUMBS}}{+START,IF,{$IN_STR,{$BREADCRUMBS},<a }}{+START,IF,{$NEQ,{$ZONE}:{$PAGE},:start}}{+START,IF,{$SHOW_HEADER}}
<nav class="global_breadcrumbs breadcrumbs" itemprop="breadcrumb" role="navigation">
{$BREADCRUMBS}
</nav>
{+END}{+END}{+END}{+END}
​​​​​

You may need to look for similar code in other templates to remove ALL breadcrumbs.
Back to the top
 
Posted
Rating:
#103191
Avatar

Fan in action

Jason, that works great. Thanks for warning me to make sure edit in template editor and to not do on default theme.
Back to the top
 
Posted
Rating:
#107452

Non-joined user

Jason,

How would I do this on a site that's not running version 9?  I have several sites that are still on version 8 and the template that you referenced doesn't exist in version 8.

Thank you,

Mark
Back to the top
 
Posted
Item has a rating of 5 (Liked by Chris Graham)  
Rating:
#107454
Avatar

Community saint

Mark, the template you want to edit for ocPortal v8 is GLOBAL.tpl. And the breadcrumbs are displayed by this code:

Code

               {+START,IF_NON_EMPTY,{BREADCRUMBS}}{+START,IF,{$NEQ,{$ZONE}:{$PAGE},:start}}
                  <{$?,{$VALUE_OPTION,html5},nav,div} class="breadcrumbs breadcrumbs_always"{$?,{$VALUE_OPTION,html5}, itemprop="breadcrumb" role="navigation"}>
                     <img class="breadcrumbs_img" src="{$IMG*,treenav}" title="{!YOU_ARE_HERE}" alt="{!YOU_ARE_HERE}" />
                     {BREADCRUMBS}
                  </{$?,{$VALUE_OPTION,html5},nav,div}>
               {+END}{+END}

Removing that whole block of code should remove the breadcrumbs from non-mobile web pages.

If you need to remove the breadcrumbs from mobile pages as well, it's in the same GLOBAL.tpl file a little further down in the template with this code:

Code

               {+START,IF_NON_EMPTY,{BREADCRUMBS}}{+START,IF,{$NEQ,{$ZONE}:{$PAGE},:start}}
                  <{$?,{$VALUE_OPTION,html5},nav,div} class="breadcrumbs breadcrumbs_always"{$?,{$VALUE_OPTION,html5}, itemprop="breadcrumb" role="navigation"}>
                     {BREADCRUMBS}
                  </{$?,{$VALUE_OPTION,html5},nav,div}>
                  <br />
               {+END}{+END}

Removing that whole block of code should remove the breadcrumbs from mobile pages. 
Back to the top
 
Posted
Rating:
#107457
Avatar

Honoured member

Thank you very much, it worked like a charm!

Regards,

Mark
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: