Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Custom Breadcrumbs Delimiter


Go to End


6 Posts   4332 Views

Avatar
micahsheets

Community Member, 165 Posts

21 April 2009 at 8:53am

I have searched the forum and found that adding SiteTree::breadcrumbs_delimiter = " | "; to _config.php should do the trick. However adding this line produces this error "Parse error: syntax error, unexpected '=' ".

In SiteTree the breadcrumbs_delimiter is a public static variable so does this mean that I can't just set it in my Page.ss file? Is that what static means when declaring a property in a class? I am still new to OOP so some of this doesn't make sense to me yet.

Avatar
Willr

Forum Moderator, 5523 Posts

21 April 2009 at 6:15pm

Looks like you are missing a $ before the variable name

SiteTree::$breadcrumbs_delimiter = "|";

Avatar
micahsheets

Community Member, 165 Posts

22 April 2009 at 3:56am

Ah, yes. I guess I missed a very obvious detail. Thanks for the help.

Avatar
bunheng

Community Member, 78 Posts

12 June 2011 at 5:39pm

Hi,

First of all thanks for your contribution, I would like to know is it possible to use Breadcrumbs Delimiter like this
SiteTree::$breadcrumbs_delimiter = "<li>";

Thanks.
Bunheng

Avatar
Willr

Forum Moderator, 5523 Posts

12 June 2011 at 6:43pm

No, you can't use li's. The delimiter is simply put between the links. If you want to use list items copy the Breadcrumbs function from SiteTree.php to your Page class and alter the HTML inside that function. One day that will be spilt out to a separate include template!

Avatar
bunheng

Community Member, 78 Posts

6 July 2011 at 2:36am

Hi Willr,

thanks for important advice, I copied the function into page and customise it.

Thanks.
Bunheng