HOWTO: Remove "Home" & "WIKI+ Home" from breadcrumbs

Post

Posted
Rating:
Item has a rating of 5 (Liked by Chris GrahamLiked by Patrick Schmalstig)
#785 (In Topic #161)
Avatar
Standard member
SoccerDad is in the usergroup ‘Community saint’
One of the beautiful things about Compsr is the ability to take different paths to accomplish the same goal. I've spent a lot of time working with templates (.TPL) so that is where I make most of my customizations. Here is one way to control the links shown in the breadcrumb trail.

Templates: BREADCRUMB_LINK_WRAP.tpl & BREADCRUMB_SEPARATOR.tpl

As always, do not use the default templates but rather "templates_custom" from your theme. I've noticed a change here from older versions, ocPortal days: selecting Templates from dropdown menu on the footer, clicking on the desired template then clicking "save" or "save and stay" was enough to generate a template copy in your themes/templates_custom folder. This no long works. To get around this, I simply add:

Code

<!--copy-->
to the top of the template file and save.

In this example, I wanted to remove  "Home" & "WIKI+ Home" from the breadcrumb trail. Change the code in BREADCRUMB_LINK_WRAP.tpl add the following:

Code

{+START,IF,{$NEQ,{LABEL*},Home,Wiki+ home}}ORIGINAL_CODE_STILL_HERE<span class="sep"><span class="accessibility_hidden"> &rarr;</span></span>&nbsp{+END}
The last bit added after the original code is simply the contents of BREADCRUMB_SEPARATOR.tpl which you in turn edit and save empty. That's it! You can add whatever page names to you like to $NEQ directive to remove from the chain.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

gabriel58, mytracker, Philip, Salman

Forum statistics:
  • 1,298 topics, 5,830 posts, 7,065 members
  • Our newest member is raguragavan
Birthdays:
Back to Top