Link in Breadcrumb trail
|
GroovyFish
![]()
Joined: 2003-11-12
Posts: 2 |
Posted: Wed, 2003-11-12 17:41
|
|
Hi All, I have spent about an hour trying to find my answer here in the forums, but no luck. I would like to add a simple link to my homepage to the breadcrumb trail so that visitors don't have to back all the way out to get back home. I am just starting out with PHP, so the more explicit the instructions, the better. Thanks a bunch!! |
|
| Login or register to post comments |


Posts: 16
Apply this code
/* home breadcrumb start */ if (strcmp($pAlbum->fields["returnto"], "no")) { $breadtext[$breadCount] ="<a href=\"/\">[Home]</a>"; $breadCount++; } /* home breadcrumb end */as illustrated below
in view_album.php and any other php's w/ crumbs
it might work better in the do-while statement, or include more code to detect if the session is offline
Posts: 2
Thank you very much!
It works great! I really appreciate your help!
Posts: 16
=)
Posts: 2
This code works great on my view_album.php and view_photo.php pages.
I can't seem to find where to put this to get it to show up on the main albums.php page.
Any advice?
Thanks
Posts: 2
There doesn't appear to be any code in albums.php relating to breadcrumbs (you don't even get the 'Logged in as: Username' message). So, an assumption would be that I just need to copy over any code relating to breadcrumbs from the view_album.php into albums.php.
Has anyone done this before and know what all needs to be moved over?
Thanks
Posts: 18451
Why not use the wrapper files this is what they are for and you don't have to edit the files after each upgrade?
But if you want a link next to the lagin and welcome message:
In albums.php look for
if ($gallery->user->isLoggedIn() && !$gallery->session->offline) { $displayName = $gallery->user->displayName(); $adminCommands .= sprintf(_("Welcome, %s"), $displayName) . " <br>"; }and add
$adminCommands .= " <a href=\"your_url_to_home/index.php\">Home</a> ";