forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: uk_martin on December 28, 2010, 03:32:59 pm
-
I refer to the breadcrumb trail customisation dealt with here - http://forum.coppermine-gallery.net/index.php/topic,68715.0.html
I've just noticed a problem with it. The "{HEADER_BREADCRUMB}" appears now on pages that may not be designed to have a breadcrumb trail, e.g. http://brummiesfans.com/coppermine/albmgr.php?cat=0
Is there a way to restrict the breadcrumb trail, in the postition where it is, to only display either completely, or not at all? In other words, if there is no Home>Gallery>Album etc then it does not display {HEADER_BREADCRUMB} which it does at the moment.
Or maybe if there is a "proper" breadcrumb trail, it uses the CSS class="breadcrumb" or if not, then the colour could be set to the background colour to at least make it appear as if it isn't there?
Thanks in advance.
Maritn
-
Open your theme.php file, find
// Breadcrumb hack - START
$CONFIG['main_page_layout'] = str_replace(array('/breadcrumb', 'breadcrumb/', 'breadcrumb'), '', $CONFIG['main_page_layout']);
global $breadcrumb;
if ($breadcrumb) {
ob_start();
theme_display_breadcrumb($breadcrumb);
$template_vars['{HEADER_BREADCRUMB}'] = ob_get_clean();
}
// Breadcrumb hack - END
and replace with
// Breadcrumb hack - START
$CONFIG['main_page_layout'] = str_replace(array('/breadcrumb', 'breadcrumb/', 'breadcrumb'), '', $CONFIG['main_page_layout']);
global $breadcrumb;
ob_start();
theme_display_breadcrumb($breadcrumb);
$template_vars['{HEADER_BREADCRUMB}'] = ob_get_clean();
// Breadcrumb hack - END
(not thoroughly tested). Please report if it works as expected in your whole gallery, so I can update the code in the other thread.
-
Thanks Andre, that works perfectly now!
:)