Is it possible to hide the breadcrumb text for the current page?
So, for example if the current page is "Widgets" the breadcrumb would be:
Home > Products
rather than
Home > Products > Widgets
I have looked through the forum and also the help on breadcrumbs but couldn't find a how-to on this.
How to hide breadcrumb text for current page
Re: How to hide breadcrumb text for current page
Have you looked in the help for it?...
Since it is a tag you will change the 'module' to 'tag' in the verbiage below \/...
Since it is a tag you will change the 'module' to 'tag' in the verbiage below \/...
Re: How to hide breadcrumb text for current page
Markmark wrote: Have you looked in the help for it?...
Since it is a tag you will change the 'module' to 'tag' in the verbiage below \/...
Thanks for your reply. Yes, as mentioned in my original post I did look in the help, but couldn't find anything in there to do what I want.
This is what the help says on the breadcrumbs tag:
Maybe I am missing something or misunderstanding what it says, but nowhere can I see a parameter that allows you to hide the current page as per my example above. Am I mistaken?What does this do?
Prints a breadcrumb trail .
How do I use it?
Just insert the tag into your template/page like: {breadcrumbs}
What parameters does it take?
* (optional) delimiter - Text to seperate entries in the list (default ">>").
* (optional) initial - 1/0 If set to 1 start the breadcrumbs with a delimiter (default 0).
* (optional) root - Page alias of a page you want to always appear as the first page in the list. Can be used to make a page (e.g. the front page) appear to be the root of everything even though it is not.
* (optional) root_url - Override the URL of the root page. Useful for making link be to '/' instead of '/home/'. This requires that the root page be set as the default page.
* (optional) classid - The CSS class for the non current page names, i.e. the first n-1 pages in the list. If the name is a link it is added to the tags, otherwise it is added to the tags.
* (optional) currentclassid - The CSS class for the tag surrounding the current page name.
* (optional) starttext - Text to append to the front of the breadcrumbs list, something like "You are here".
Re: How to hide breadcrumb text for current page
You could add a class with this:
* (optional) currentclassid - The CSS class for the tag surrounding the current page name.
Then style that class as hidden by adding this to your stylesheet:
Nullig
* (optional) currentclassid - The CSS class for the tag surrounding the current page name.
Code: Select all
{breadcrumbs currentclassid='hide'}
Code: Select all
.hide {
display: none;
}
Re: How to hide breadcrumb text for current page
Nullig - thanks for the explanation. Sorry I read that but it didn't twig that was what I needed - doh!
I added the code and CSS and it's almost perfect, except for the fact that the delimiter before the hidden current page name remains like this:
Home > Products >
I'm possibly missing something again, but I cannot see a way to suppress that as well.
I added the code and CSS and it's almost perfect, except for the fact that the delimiter before the hidden current page name remains like this:
Home > Products >
I'm possibly missing something again, but I cannot see a way to suppress that as well.
Re: How to hide breadcrumb text for current page
Not sure how you'd eliminate the last delimiter, but you could change it to a space or something else using:
delimiter=" "
or
delimiter="whatever you want"
in the tag.
Nullig
delimiter=" "
or
delimiter="whatever you want"
in the tag.
Nullig
Re: How to hide breadcrumb text for current page
Yes, that's true, but then that means losing the delimiter between the other items. It's odd that the currentclassid selector doesn't allow the ability to also hide the last delimiter - seems like an oversight.Nullig wrote: Not sure how you'd eliminate the last delimiter, but you could change it to a space or something else using:
delimiter=" "
or
delimiter="whatever you want"
in the tag.
Nullig
Anyway, thanks for your help nonetheless.
Re: How to hide breadcrumb text for current page
.lastitem{
display:none;
}
this works
display:none;
}
this works