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

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by Chris GrahamLiked by PDStigLiked by superduper)
#839 (In Topic #214)
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.

1 guest and 0 members have recently viewed this.