Possible to not have breadcrumbs appear 1st level?[SOLVED]

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
wmisk
Forum Members
Forum Members
Posts: 39
Joined: Tue Aug 02, 2011 5:00 am

Possible to not have breadcrumbs appear 1st level?[SOLVED]

Post by wmisk »

This is an old post, so I was wondering if there is a more updated solution besides a different template. I'm trying to set up as much formatting as possible so my client doesn't have to choose different templates and such, so it's much easier for him to add new pages.

I'm using 1.10.3

I tried putting this in my template:

Code: Select all

{if $node->child == true}{breadcrumbs}{/if}
and

Code: Select all

{if $node->haschildren == true}{breadcrumbs}{/if}
but those just made all the breadcrumbs go away. I'm trying to achieve the same effect-only show a breadcrumb if it's a child link so there is an actual trail, and not show them on root or first level pages.

Would something in CustomContent work in this case?
Last edited by wmisk on Sun Jul 22, 2012 5:52 am, edited 1 time in total.
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am

Re: Possible to not have breadcrumbs appear if only at the f

Post by applejack »

in the menu manger you could create a flag if node level is 1 and therefore not show.
uniqu3

Re: Possible to not have breadcrumbs appear if only at the f

Post by uniqu3 »

Try

Code: Select all

{if $position|substr_count:'.' < '1'}{breadcrumbs}{/if}
This would output breadcrumbs only on subpages.
wmisk
Forum Members
Forum Members
Posts: 39
Joined: Tue Aug 02, 2011 5:00 am

Re: Possible to not have breadcrumbs appear if only at the f

Post by wmisk »

That code actually did the opposite-it would only put the breadcrumb on the root level, but not the sub pages. I tried flipping the sign to > and breadcrumbs disappeared on all pages. I also tried changing the number to 2 instead of 1 and that showed breadcrumbs on all pages.
uniqu3

Re: Possible to not have breadcrumbs appear if only at the f

Post by uniqu3 »

Code: Select all

{if !$position|substr_count:'.' < '1'}{breadcrumbs}{/if}
See exclamation.
wmisk
Forum Members
Forum Members
Posts: 39
Joined: Tue Aug 02, 2011 5:00 am

Re: Possible to not have breadcrumbs appear if only at the f

Post by wmisk »

Yes, that worked! Thank you so much!
Post Reply

Return to “CMSMS Core”