21310 Posts in 5739 Topics by 2604 members
| Go to End | Next > | |
| Author | Topic: | 4800 Views |
-
Customizing $Breadcrumbs

1 December 2009 at 6:27am
Is there an easy way to customize the output of the Breadcrumbs without editing core files. I know I can change the Delimiter but what if I want to output breadcrumbs as a list instead of a line? I could always jQuery it to look the way I want but that doesn't help for degradation.
Perhaps later versions of SS could use a template file to render breadcrumbs much like rendering a menu
-
Re: Customizing $Breadcrumbs

1 December 2009 at 7:42pm
If you want to customize the HTML it returns currently the only way is to copy the Breadcrumbs function from SiteTree.php to your own Page.php. Then you can customize the function / output as much as you want
-
Re: Customizing $Breadcrumbs

17 April 2010 at 3:59am
Hmm, when I try this, I just get a blank page. Any idea why? I've tried changing the method name to Crumbs, but it still gives me a blank page when I update my template to $Crumbs, so it seems that for some reason the method in the SiteTree class doesn't work in the Page class.
Any thoughts would be helpful =)
-
Re: Customizing $Breadcrumbs

17 April 2010 at 7:48am
Hi!
>> Hmm, when I try this, I just get a blank page. Any idea why?
Because you have an error in your code. Activate the dev mode and you will easily find it.
-
Re: Customizing $Breadcrumbs

23 April 2010 at 8:45am
Dev mode is already activated. still getting a blank page
-
Re: Customizing $Breadcrumbs

19 August 2010 at 1:43am
Tried to simply copy/paste the function $Breadcrumbs from SiteTree.php to Page.php in the "class Page extends SiteTree" section. I changed function name (and function calls in the templates) to $ModifiedBreadcrumbs, then modified "Title" with "MenuTitle": works like a charme and now i get proper menu labels in the breadcrumb
-
Re: Customizing $Breadcrumbs

23 February 2011 at 11:27pm
Thanks for that. Works fine. Also had to add
public static $breadcrumbs_delimiter = " » ";
to the Page.php
This issue has been raised a few times for over 3 years now. Why do the developers continue to make the Breadcrumbs function use page titles instead of the navigation label?
-
Re: Customizing $Breadcrumbs

24 February 2011 at 8:40pm
This issue has been raised a few times for over 3 years now. Why do the developers continue to make the Breadcrumbs function use page titles instead of the navigation label?
Patches for that are welcome. It would be great it the Breadcrumbs function actually used a template file so that you could customize the entire thing in your theme.
| 4800 Views | ||
| Go to Top | Next > |



