Hi!
How do you change the breadcrumb, which is the navigation that is usually positioned at the top of the page?
What I would like to do is to add a link "Home" to my web page in Zenphoto. At present the breadcrumb looks something like this:
Photos -> Travels -> Madagascar -> Very nice pic!
but I would like to change it to:
Home -> Photos -> Travels -> Madagascar -> Very nice pic!
Hope you understand what I mean.
I am using the theme Stopdesign but think this is a general question.
In the Zenphoto Admin tools, under options you can fill in "Website url", which means "This is used to link back to your main site, but your theme must support it". I guess Stopdesign does not support this feature.
The question: Where does the "Website url" go in the configuration file? I cannot find it.
Do you have an Idea how the Stopdesign theme can be modified to support web page linking. I think it should be fairly simple but I just cant figure it out.
Daniel
Comments
You just need to add this: http://www.zenphoto.org/trac/wiki/TemplateFunctionsGuide#printMainSiteLinktitleclassid
to the gallery title div of the index, album and image files in the theme
In zenphoto/themes/stopdesign/index.php on row 124 the original code is:
<p id="path"><?php echo getGalleryTitle(); ?>
I have changed this to:
<p id="path"><?php printMainSiteLink('$title', '$class', '$id'); ?> > <?php echo getGalleryTitle(); ?>
This gives what I want, and prints my "domain" as supposed. The problem is when I click on "domain" to get back to my web page I end up at http://www.domain.com/zenphoto/www.domain.com and not http://www.domain.com? I have not added the Website url in zp-config.php. I have only added Website url in Admin tools under options. What am I doing wrong?
One more thing. Note that I had to add ">" in "?> > <?" instead of just "?> <?" to make it look right. Isn't it possible to use the function printParentBreadcrumb to do this. In what way should it then be used?
Daniel
Yes, you can use `printParentBreadcrumb`for that:
http://www.zenphoto.org/trac/wiki/TemplateFunctionsGuide#printParentBreadcrumbbeforebetweenafter
For the record, this is what I change to, to link back to the main site.
index.php:
`
<?php printMainSiteLink('$title', '$class', '$id'); ?> > <?php echo getGalleryTitle(); ?>
`album.php:
`
<?php printMainSiteLink('$title', '$class', '$id'); ?> > " title="Albums Index"><?php echo getGalleryTitle();?> > <?php printParentBreadcrumb("", " > ", " > "); ?> <?php printAlbumTitle(false);?>
`Image.php:
`
<?php printMainSiteLink('$title', '$class', '$id'); ?> > " title="Albums Index"><?php echo getGalleryTitle();?> > <?php printParentBreadcrumb("", " > ", " > "); ?> " title="Album Thumbnails"><?php echo getAlbumTitle();?> > <?php echo getImageTitle(); ?>
`I didn't get the printParentBreadcrumb to work so I had to add ">" manually. but it works!
Daniel