Breadcrumbs shows duplicate root (v1.7)

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
joeri
Forum Members
Forum Members
Posts: 11
Joined: Tue Sep 22, 2009 4:38 am

Breadcrumbs shows duplicate root (v1.7)

Post 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
Last edited by joeri on Wed Apr 07, 2010 9:08 am, edited 1 time in total.
owr_bgld

Re: Breadcrumbs shows duplicate root (v1.7)

Post 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}
joeri
Forum Members
Forum Members
Posts: 11
Joined: Tue Sep 22, 2009 4:38 am

Re: Breadcrumbs shows duplicate root (v1.7)

Post 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.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Breadcrumbs shows duplicate root (v1.7)

Post 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
owr_bgld

Re: Breadcrumbs shows duplicate root (v1.7)

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Breadcrumbs shows duplicate root (v1.7)

Post by Dr.CSS »

It comes from breadcrumbs thinking nobody puts anything under the Home page most times...
Post Reply

Return to “CMSMS Core”