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 <title> 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 <?php printParentBreadcrumb(); ?> 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.
Comments
Perhaps we should have indeed a "get" variant for this. Best you open a ticket for that so we don't forget.
Where would I find the printParentBreadcrumb function. Which file would it be in?
`
// 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;
}
`
Thank you SO much!
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?
$_zp_current_search->dynalbumname;
with:
$_zp_current_search->getDynamicAlbum();
$_zp_current_search->getDynamicAlbum()->AlbumName