A snag with the breadcrumb trail A snag with the breadcrumb trail
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

A snag with the breadcrumb trail

Started by uk_martin, December 28, 2010, 03:32:59 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

uk_martin

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

ΑndrĂ©

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.

uk_martin

Thanks Andre, that works perfectly now!
:)