Page 1 of 1

Breadcrumbs shows duplicate root (v1.7)

Posted: Wed Apr 07, 2010 6:27 am
by joeri
I am running the latest CMSMS v1.7 on PHP v5+ / Apache v2.2.

Problem
When adding children pages of the root (most likely home) the front end breadcrumbs would show the home twice.

e.g. home > home > homechildpage

instead of:
e.g. home > homechildpage
By using: {breadcrumbs root='Home' delimiter=' > '}

"home" is set as the default page.

How should it be?

Clearly like this:
e.g. home > homechildpage

All other pages work perfect and actually show this:
home > otherparentpage > childpage

So I guess in the function home should be ignored if in its own category, or is there a setting to ignore this already?

Thanks in advance!

PS.
You can reproduce it here:
Example: http://www.opensourcecms.com/demo/1/10/CMS_Made_Simple

Re: Breadcrumbs shows duplicate root (v1.7)

Posted: Wed Apr 07, 2010 9:46 am
by owr_bgld
Do you need the "Home" at the beginning of each site?
You are here: Home  » How CMSMS Works
If you don't need it you can delete the root="Home"

or you make it this way (change home to another pagealias if necessary):

Code: Select all

{if $page_alias == 'home'}{breadcrumbs delimiter=' > '}{else}{breadcrumbs root='Home' delimiter=' > '}{/if}

Re: Breadcrumbs shows duplicate root (v1.7)

Posted: Wed Apr 07, 2010 12:52 pm
by joeri
Do you need the "Home" at the beginning of each site?
Yes. I want 'home' to be present at all times.

Current situation:

1. At homepage:
You are here: home

2. In childpage of home:
You are here: home > home > childpage

3. In childpage of another parent:
You are here: home > parent > childpage

1 and 3 are correct behavior, just in 2, we suddenly have 2x home.

Your solution won't take out the home, as you assumed:
You are here: home > home

Which never happens.

Re: Breadcrumbs shows duplicate root (v1.7)

Posted: Wed Apr 07, 2010 1:03 pm
by RonnyK
You probably should take the root= out of the call, as that is used to have a root-page showing as HOME, when even it isnt the rootpage. In your case, you could go without.

Ronny

Re: Breadcrumbs shows duplicate root (v1.7)

Posted: Wed Apr 07, 2010 4:29 pm
by owr_bgld
ok it can't work - sorry the page_alias is only home at the "Home"

You can try this:

Code: Select all

{assign var="check_fpos" value=$friedlyposition|truncate:1}       // maybe it only works with $friedlyposition|truncate:1:""
{if $check_fpos == '1'}
  {breadcrumbs delimiter=' > '}
{else}
  {breadcrumbs root='Home' delimiter=' > '}
{/if}
trancate:1 means thet only the first digit of the friendlyposition will be taken
check_fpos should be the position of home (it's normally 1 ;) )
the children of "Home" have 1.1 1.1.1 1.1.2 1.2 1.3 .....

maybe there is also another way to get only the first number, but I'm sorry -  I don't know that

Re: Breadcrumbs shows duplicate root (v1.7)

Posted: Fri Apr 09, 2010 6:52 pm
by Dr.CSS
It comes from breadcrumbs thinking nobody puts anything under the Home page most times...