Link to home page from Breadcrumb

hovering
hovering's picture

Joined: 2003-06-04
Posts: 21
Posted: Sun, 2007-11-25 17:08

How do I put a link to my home page (index.html) at the beginning of my G2 breadcrumb?

OK. I have spent the past few days searching for this. It can't be this hard and I imagine others have already asked this question. Anatomy of a Theme has helped me understand the structure of things a bit, but my programming skills are from the 80's and I must cobble things together... search keywords (modify, breadcrumb, gallery2, matrix, home, link, and others) aren't getting me there either. Help?

Thanks. ~Hovering

Website:
http://www.domesticblissinc.com/gallery2/main.php

Deets:

Gallery version = 2.2.3 core 1.2.0.5
PHP version = 4.3.11 apache
Webserver = Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a
Database = mysql 4.0.27-standard, lock.system=flock
Toolkits = ArchiveUpload, Exif, Getid3, NetPBM, ImageMagick, LinkItemToolkit, Thumbnail, Gd
Acceleration = none, none
Operating system = Linux host.gserver2.com 2.4.20-021stab028.19.777-smp #1 SMP Wed Oct 19 13:25:22 MSD 2005 i686
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/419.3 (KHTML, like Gecko) Safari/419.3
Rows in GalleryAccessMap table = 120
Rows in GalleryAccessSubscriberMap table = 2839
Rows in GalleryUser table = 5
Rows in GalleryItem table = 2803
Rows in GalleryAlbumItem table = 37
Rows in GalleryCacheMap table = 0

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2007-11-25 18:00

Step by step:

1. First create new subdir "local" in "gallery2/modules/core/templates/blocks/".

2. Copy BreadCrumb.tpl to this new subdir

3. Change local/BreadCrumb.tpl
add you link just after:
<div class="{$class}">

Some themes have this setting but matrix for example does not.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
hovering
hovering's picture

Joined: 2003-06-04
Posts: 21
Posted: Sun, 2007-11-25 19:27

Thank you floridave. That all makes perfect sense now. And it works.

http://www.domesticblissinc.com/gallery2/main.php

Which makes me wonder..

Where would I go to put a CONTACT link in front of the Login link on the right side?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2007-11-25 19:49

http://codex.gallery2.org/Gallery2:User_Contributions#Modules try these modules:

Contact Owner
Links Page
About Page
Links In The Head

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
hovering
hovering's picture

Joined: 2003-06-04
Posts: 21
Posted: Mon, 2007-11-26 02:26

Disco.

Thanks!

 
DRIVE

Joined: 2007-12-04
Posts: 3
Posted: Tue, 2007-12-04 11:40

This does not work with the Matrix theme. It inserts the separation character before home (> home). What is the proper way to add a static link in the breadcrumbs? Anyone?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2007-12-04 14:32

DRIVE,
What is 'this'?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Thu, 2007-12-06 09:56

See my site: www.girlondesktop.com

Please tell me how to change Celebrity Wallpaper, Girl Wallpaper, Sexy Wallpaper & Bikini Wallpaper in Bread-Crumb to "Home" and KEEP site title!

Thank you!
_____________________
Luxury Car Wallpaper - Sexy Wallpaper

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2007-12-06 23:16

modules/core/templates/blocks/BreadCrumb.tpl

  {foreach name=parent from=$theme.parents item=parent}
  {if !$smarty.foreach.parent.last}
  <a href="{g->url params=$parent.urlParams}" class="BreadCrumb-{counter name="BreadCrumb"}">
   {if $smarty.foreach.parent.first}home{else}
    {$parent.title|markup:strip|default:$parent.pathComponent}{/if}</a>
  {else}
  <a href="{g->url params=$parent.urlParams}" class="BreadCrumb-{counter name="BreadCrumb"}">
    {if $smarty.foreach.parent.first}home{else}
    {$parent.title|markup:strip|default:$parent.pathComponent}{/if}</a></a>
  {/if}
  {if isset($separator)} {$separator} {/if}
  {/foreach}

to

  {foreach name=parent from=$theme.parents item=parent}
  {if !$smarty.foreach.parent.last}
  <a href="{g->url params=$parent.urlParams}" class="BreadCrumb-{counter name="BreadCrumb"}">
   {if $smarty.foreach.parent.first}home{else}
    {$parent.title|markup:strip|default:$parent.pathComponent}{/if}</a>
  {else}
  <a href="{g->url params=$parent.urlParams}" class="BreadCrumb-{counter name="BreadCrumb"}">
    {if $smarty.foreach.parent.first}home{else}
    {$parent.title|markup:strip|default:$parent.pathComponent}{/if}</a></a>
  {/if}
  {if isset($separator)} {$separator} {/if}
  {/foreach}

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Fri, 2007-12-07 02:16

Here is my Breadcrumb.tpl file, I can't find the code you posted above:

Quote:
{*
* $Revision: 15342 $
* If you want to customize this file, do not edit it directly since future upgrades
* may overwrite it. Instead, copy it into a new directory called "local" and edit that
* version. Gallery will look for that file first and use it if it exists.
*}
{*
* Go through each breadcrumb and display it as a link.
*
* G2 uses the highlight id to figure out which page to draw when you follow the
* breadcrumbs back up the album tree. Don't make the last item a link.
*}
<div class="{$class}">
{foreach name=parent from=$theme.parents item=parent}
{if !$smarty.foreach.parent.last}
<a href="{g->url params=$parent.urlParams}" class="BreadCrumb-{counter name="BreadCrumb"}">
{$parent.title|markup:strip|default:$parent.pathComponent}</a>
{else}
<a href="{g->url params=$parent.urlParams}" class="BreadCrumb-{counter name="BreadCrumb"}">
{$parent.title|markup:strip|default:$parent.pathComponent}</a>
{/if}
{if isset($separator)} {$separator} {/if}
{/foreach}

{if ($theme.pageType == 'admin' || $theme.pageType == 'module')}
<a href="{g->url arg1="view=core.ShowItem"
arg2="itemId=`$theme.item.id`"}" class="BreadCrumb-{counter name="BreadCrumb"}">
{$theme.item.title|markup:strip|default:$theme.item.pathComponent}</a>
{else}
<span class="BreadCrumb-{counter name="BreadCrumb"}">
{$theme.item.title|markup:strip|default:$theme.item.pathComponent}</span>
{/if}
</div>

_____________________
Luxury Car Wallpaper - Sexy Wallpaper

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2007-12-07 02:31

Perhaps you need my glasses?
after:
<div class="{$class}">

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Thu, 2007-12-13 14:25

I have this problem:

Please view: http://www.girlondesktop.com/v/Movie_Star/Angelina_Jolie/

In navigation is: Home » Movie Star Wallpaper » Angelina Jolie Wallpaper

But: http://www.girlondesktop.com/v/Movie_Star/Angelina_Jolie/Angelina+Jolie+_79_.jpg.html

The navigation is: Home » Home » Angelina Jolie Wallpaper » Free Wallpaper Desktop Angelina Jolie

May I did something wrong?
_____________________
Luxury Car Wallpaper - Sexy Wallpaper

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Sun, 2008-12-21 19:08

Ok, I can do it now, but when click to "home", it forward me to domain/index.php

But I want forward me to domain.com/ only.

Please help.

Thanks1