Enable breadcrumb everywhere but root album?

Twilight4Ever
Twilight4Ever's picture

Joined: 2006-08-07
Posts: 130
Posted: Tue, 2009-11-24 13:12

I wanted to show the breadcrumb everywhere but the root, so I used

Quote:
{if !empty($theme.params.BreadCrumb)}
{if $theme.item.parentId > 0}

which worked, except that this meant the breadcrumb wouldn't show on pages like editing the album, or going to the site admin, or logging in.

Is there a way I can do something like this, in order to get the breadcrumb to only not show up on the root album? (these examples don't work for me)

Quote:
{if !empty($theme.params.BreadCrumb)}
{if $theme.item.parentId > 0 || ($theme.item.parentId = 0 && $theme.pageType != 'album'}

Quote:
{php}
if (($theme.item.parentId > 0) || ($theme.item.parentId = 0 && $theme.pageType != 'album'))
{
{/php}

________________________________________________
NOT a "Twilight" fan... Just a fan of sunsets. :)

 
Twilight4Ever
Twilight4Ever's picture

Joined: 2006-08-07
Posts: 130
Posted: Tue, 2009-11-24 13:54

http://codex.gallery2.org/Gallery2:How_Do_I_Remove_the_Root_Album_Link remotes the root album link from every breadcrumb, which isn't what I'm looking for. I just want no breadcrumb whatsoever on the root album page.

I also made a copy of BreadCrumb.tpl and put it into a modules/core/templates/blocks/local/ folder, and took out:

Quote:
<span class="BreadCrumb-{counter name="BreadCrumb"}">
{$theme.item.title|markup:strip|default:$theme.item.pathComponent}</span>

but it didn't make a difference.
________________________________________________
NOT a "Twilight" fan... Just a fan of sunsets. :)

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2009-11-24 17:22

This is the canonical link for how to show stuff only on the home page:
http://gallery.menalto.com/node/70763#comment-255788

So it's very straightforward to turn this into something that shows everywhere except on the home page.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2009-11-25 02:57

I'm a bit confused. If you are on the root album, the breadcrumb is not a link but just the title of the album. Is that what you want to remove?

Quote:
I also made a copy of BreadCrumb.tpl and put it into a modules/core/templates/blocks/local/ folder, and took out:
Quote:

<span class="BreadCrumb-{counter name="BreadCrumb"}">
{$theme.item.title|markup:strip|default:$theme.item.pathComponent}</span>

but it didn't make a difference.

Should work if you clear template cache.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Twilight4Ever
Twilight4Ever's picture

Joined: 2006-08-07
Posts: 130
Posted: Fri, 2009-12-04 20:16

You're right. It seems I hadn't deleted both lines, just one. Fixed, and now it's working. Thank you!

________________________________________________
NOT a "Twilight" fan... Just a fan of sunsets. :)