Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 04:07:49 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155533 Posts in 21713 Topics by 7739 Members
Latest Member: audillino
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Removing automaticly applied text from template, searching for answer  (Read 615 times)
Finnish

Offline Offline

Posts: 3


« on: February 16, 2010, 12:27:36 PM »

Hi,

I've modded a german template and all is quite well, but I get a little "You are here"-text in the page, in every page. I've looked in the template folder but I just can't find the phrase or how it gets to frontpage and subpages. The source code from my pages looks like this:
Code:
<div id="inhalt">    
                    <div id="inhalt_oben"><div id="bredcrumbs"><div class="breadcrumb"><span class="title">You are here: </span><span class="crumb">Company</span></div>

The template I'm modding is this: http://cms-websitebaker.de/cms-template/pages/blume.php

"You are here"-text is where that Seite: > Blume is.

Help?
Logged
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #1 on: February 16, 2010, 02:07:58 PM »

Open your template, and search for show_menu call after "You are here" text , then delete whole block..
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Monky
Development Team
*****
Offline Offline

Posts: 47



WWW
« Reply #2 on: February 16, 2010, 02:11:46 PM »

That text is called a breadcrumb. (http://de.wikipedia.org/wiki/Brotkrümelnavigation)
I guess it gets generated by a function - like the menu.
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #3 on: February 16, 2010, 02:40:11 PM »

It is generated by the function "show_breadcrumbs()" unfortunatley the text is still hardcoded. Around Line 283 in file /wb/framework/frontend.functions.php you can change that.

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

Finnish

Offline Offline

Posts: 3


« Reply #4 on: February 16, 2010, 03:25:49 PM »

It is generated by the function "show_breadcrumbs()" unfortunatley the text is still hardcoded. Around Line 283 in file /wb/framework/frontend.functions.php you can change that.

cheers

Klaus

Thanks!!! Hmm, how can I mod that file, it seems I can mod e.g. template-files within WB file modder but is this harder with writing rights?
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #5 on: February 16, 2010, 03:33:09 PM »

nae ... you'll have to download / modify with texteditor / upload the file unless you can do it on a unix shell (provided you have access to it).

I anyway also created a ticket for it on our project site.

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

Finnish

Offline Offline

Posts: 3


« Reply #6 on: February 16, 2010, 05:51:06 PM »

Thanks a lot! That did it, great!

But, there's still page_id that's lurking there... If I can get rid of that... Grrrreat!
Code:
if (!function_exists('show_breadcrumbs'))
{
    function show_breadcrumbs($sep = ' &raquo; ',$level = 0, $links = true, $depth = -1, $title = '')
    {
        global $wb;
        $page_id = $wb->page_id;

        if ($page_id != 0)
        {
             global $database;
            $counter = 0;
            // get links as array
            $bread_crumbs = $wb->page_trail;
            $count = sizeof($bread_crumbs);
            // level can't be greater than sum of links
            $level = ($count <= $level ) ? $count-1 : $level;
            // set level from which to show, delete indexes in array
            $crumbs = array_slice($bread_crumbs, $level );
            $depth = ($depth <= 0) ? sizeof($crumbs) : $depth;
            // if empty array, set orginal links
            $crumbs = (!empty($crumbs)) ?  $crumbs : $wb->page_trail;
            $total_crumbs = ( ($depth <= 0) OR ($depth > sizeof($crumbs)) ) ? sizeof($crumbs) : $depth;
            print '<div class="breadcrumb"><span class="title">'.$title.'</span>';
          //  print_r($crumbs);
            foreach ($crumbs as $temp)
            {
                if($counter == $depth) { break; }
                    // set links and separator
                    $query_menu = $database->query("SELECT * FROM ".TABLE_PREFIX."pages WHERE page_id = $temp");
                    $page = $query_menu->fetchRow();

                    $show_crumb = (($links == true) AND ($temp != $page_id))
                            ? '<a href="'.page_link($page['link']).'" class="link">'.$page['menu_title'].'</a>'
                            : '<span class="crumb">'.MENU_TITLE.'</span>';

                    // Permission
                    switch ($page['visibility'])
                    {
                        case 'none' :
                        case 'hidden' :
                        // if show, you know there is an error in a hidden page
                            print $show_crumb.'&nbsp;';
                        break;
                        default :
                            print $show_crumb;
                        break;
                    }

                    if ( ( $counter <> $total_crumbs-1 ) )
                    {
                        print '<span class="separator">'.$sep.'</span>';
                    }
                $counter++;
            }
            print "</div>\n";
        }
    }
}

I anyway also created a ticket for it on our project site.
Whats that, project site?
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #7 on: February 16, 2010, 07:07:18 PM »

Have a look at the top links ... you'll find out ...

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

DarkViper
Development Team
*****
Offline Offline

Posts: 1252


« Reply #8 on: February 16, 2010, 09:06:06 PM »

the '$title' shown in breadcrumbs is definitely NOT hardcoded!!
There is absolutely NO need to change any file in WB-Core!

in your template you must change only line #80 into:
Code:
...
<div id="inhalt_oben"><div id="bredcrumbs"> Seite:  > <?php show_breadcrumbs(' &raquo; '0true, -1'Sie sind hier: ');?></div></div>
...

The behavior of show_breadcrumbs() is depending from default settings witch will be used, as long as you don't give a personal value for it.

Remember: There is no need to change any code inside of websitebaker!
Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #9 on: February 16, 2010, 10:30:19 PM »

I see it different. The variable is set hardcoded within the frontend function, at least if nothing is passed on to the function. the content of this variable should be moved to the language file so that it can be used language specific without passing anything extra to the function. That is why the ticket was posted.

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

DarkViper
Development Team
*****
Offline Offline

Posts: 1252


« Reply #10 on: February 16, 2010, 10:42:16 PM »

ok.. will see the next three four days... maybe a complete recoded funktion. (because there are more then 10% to change..)
Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
Luisehahne
Board Member
Development Team
*****
Offline Offline

Posts: 3147



WWW
« Reply #11 on: February 17, 2010, 03:31:53 AM »

The $title is only a default value. Ok we can do it, so a new variable have to add to each language. More missing varibales, before we begin?

Dietmar
Logged

We are human beings - and nobody is perfect at all.
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!