Page 1 of 1

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

Posted: Tue Jul 17, 2012 4:32 am
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?

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

Posted: Wed Jul 18, 2012 12:20 am
by applejack
in the menu manger you could create a flag if node level is 1 and therefore not show.

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

Posted: Wed Jul 18, 2012 9:38 am
by uniqu3
Try

Code: Select all

{if $position|substr_count:'.' < '1'}{breadcrumbs}{/if}
This would output breadcrumbs only on subpages.

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

Posted: Sat Jul 21, 2012 4:09 am
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.

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

Posted: Sat Jul 21, 2012 6:03 am
by uniqu3

Code: Select all

{if !$position|substr_count:'.' < '1'}{breadcrumbs}{/if}
See exclamation.

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

Posted: Sun Jul 22, 2012 5:51 am
by wmisk
Yes, that worked! Thank you so much!