Exclude root folder from Breadcrumbs
How do I exclude the root folder "/" from showing up on the breadcrumbs velocity format?
- breadcrumb-ul.vm 2.49 KB
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by zepedac on 02 Jul, 2015 07:52 PM
Here is the .txt version of the format.
2 Posted by Ryan Griffith on 02 Jul, 2015 07:58 PM
Hi,
Perhaps you can surround the contents of the
#foreach
with an#if
statement that checks to make sure the current crumb's path is not/
. Something like the following:Please let me know how this works out, or if you have any questions.
Thanks!
3 Posted by zepedac on 02 Jul, 2015 08:22 PM
Hi Ryan,
I've tried wrapping it right after the #foreach and no luck. Can't figure out why it isn't complying.
4 Posted by Ryan Griffith on 02 Jul, 2015 08:25 PM
Thank you for following up. Perhaps try outputting the value of
$crumb.getChild("path").value
just to check and see what the path value is for the root folder. I believe it should be/
, but could be wrong.Thanks!
5 Posted by zepedac on 02 Jul, 2015 08:32 PM
Ryan,
In my case it output
//
rather than/
. Strange, but that worked on the conditional statement you provided.Thank you for your help!
6 Posted by Ryan Griffith on 06 Jul, 2015 11:55 AM
Ah, thank you for testing, and I am glad to hear you were able to get things working. I have seen that as well for the root folder, so I would go with that conditional for the time being.
I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.
Have a great day!
Ryan Griffith closed this discussion on 06 Jul, 2015 11:55 AM.