Breadcrumb hack??

rhambling
rhambling's picture

Joined: 2004-08-26
Posts: 11
Posted: Fri, 2005-05-13 03:16

I was wondering if there is a way to change the breadcrumb to show the main gallery title as "Home".

Right now it shows "(Main album title)>>child title"
I want it to show "Home>>child title"

I want to be able to do this without changing the main album title so that way it shows the title in the IE window frame.

I have looked in layouts/matrix/templates/pathbar.tpl and cannot figure it out.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-05-13 03:38

see how it puts firstChild? use the same if to put in your custom text.

 
rhambling
rhambling's picture

Joined: 2004-08-26
Posts: 11
Posted: Fri, 2005-05-13 14:35

which firstchild line of text?

<ul class="gbBreadCrumb">
    {section name=parent loop=$layout.parents}
    <li{if $smarty.section.parent.first} class="firstChild"{/if}>    <<--This one?
      {if !$smarty.section.parent.last}
	<a href="{g->url arg1="view=core:ShowItem" arg2="itemId=`$layout.parents[parent].id`"
	 arg3="highlightId=`$layout.parents[parent.index_next].id`"}">
	  {$layout.parents[parent].title|default:$layout.parents[parent].pathComponent|markup}
	</a>
      {else}
	<a href="{g->url arg1="view=core:ShowItem" arg2="itemId=`$layout.parents[parent].id`"
	 arg3="highlightId=`$layout.item.id`"}">
	  {$layout.parents[parent].title|default:$layout.parents[parent].pathComponent|markup}
	</a>
      {/if}
    </li>
    {/section}
    <li{if empty($layout.parents)} class="firstChild"{/if}>    <<-- or this one?
      {$layout.item.title|default:$layout.item.pathComponent|markup}
    </li>
  </ul>

also I'm not sure on how to write the custom text in?

Thanks

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-05-13 15:30

hm, i guess you need both actually..

{if $smarty.section.parent.first} Home {else}
{$layout.parents[parent].title|default:$layout.parents[parent].pathComponent|markup}
{/if}
{if empty($layout.parents)} Home {else}
{$layout.item.title|default:$layout.item.pathComponent|markup}
{/if}
 
rhambling
rhambling's picture

Joined: 2004-08-26
Posts: 11
Posted: Fri, 2005-05-13 15:40

Ok couple problems with this.

1. when you view the main album, the title still shows what ever you name the main album and not "Home" but when you view a sub album it switches to "Home>>sub-album"

2. the hyperlinks links disappear

Thanks

 
rhambling
rhambling's picture

Joined: 2004-08-26
Posts: 11
Posted: Fri, 2005-05-13 15:51

thanks for your hard work but i went another route and hard coded the window title and deleted the album title code do get it to do what i wanted.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-05-13 17:18

ok.. just for reference..
1) the 2nd code block above is for when you're viewing the top level album
2) maybe you didn't put the code blocks in the right place