Ok.
I have an album eg this one.
http://www.spoilertv.co.uk/images/30-rock/season-1/cast-promotional-photos/
Now at the top you can see the Album and breadcrumbs.
ie this
SpoilerTV | Photo Archive | 30 Rock | Season 1 | Cast Promotional Photos
This is all great and working dandy
However if you look at my tag the Page title is
Photo Archive | Cast Promotional Photos
I'm trying to set the Title Tag to be the same as this
SpoilerTV | Photo Archive | 30 Rock | Season 1 | Cast Promotional Photos
However when I try it appears to be inserting html/link.
It seems that provides all the link/html.
Is there a similar function that will just get the text of the breadcrumb etc
Any help/advice/links most appreciated.
I use the following function in a few of my themes to get the album/image parent breadcrumb. I would call this in the title tag on album.php and image.php, along with the rest of the title info.
// Sets expanded titles (breadcrumbs) for Title meta function getTitleBreadcrumb($before = ' ( ', $between=' | ', $after = ' ) ') { global $_zp_gallery, $_zp_current_search, $_zp_current_album, $_zp_last_album; $titlebreadcrumb = ''; if (in_context(ZP_SEARCH_LINKED)) { $dynamic_album = $_zp_current_search->dynalbumname; if (empty($dynamic_album)) { $titlebreadcrumb .= $before.gettext("Search Result").$after; if (is_null($_zp_current_album)) { return; } else { $parents = getParentAlbums(); } } else { $album = new Album($_zp_gallery, $dynamic_album); $parents = getParentAlbums($album); if (in_context(ZP_ALBUM_LINKED)) { array_push($parents, $album); } } } else { $parents = getParentAlbums(); } $n = count($parents); if ($n > 0) { $titlebreadcrumb .= $before; $i = 0; foreach($parents as $parent) { if ($i > 0) $titlebreadcrumb .= $between; $titlebreadcrumb .= $parent->getTitle(); $i++; } $titlebreadcrumb .= $after; } return $titlebreadcrumb; }
Several months ago, we started with the zpmasonry theme and customized / expanded it for our needs. One zpmasonry function that we kept (in our theme's functions.php) is getTitleBreadcrumb. It is exactly the same (character for character) as above (gjr's posting from a year ago).
Our site was working fine until we just now upgraded to 1.4.4. Now it causes an error when we try to view an image in a dynamic album: "Fatal error: Cannot access protected property SearchEngine::$dynalbumname in ...".
Did 1.4.4 modify property dynalbumname?
Any suggestions on how to re-write function getTitleBreadcrumb?
Thanks gjr - that almost did it. That gets the album, but not its name. This actually fixed it:
$_zp_current_search->getDynamicAlbum()->AlbumName