Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: Adding a div in breadcrumbs, but...  (Read 2411 times)

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Adding a div in breadcrumbs, but...
« on: May 24, 2007, 12:25:24 pm »

...the HOME/START/FRONTPAGE location do not show when not logged in.

Ok, here's what I'm doing:
Quote
function breadcrumbs() {
echo '<div class="bread"';
   $link = '<a href="'.db('website').'';
   if ($_SESSION[db('website').'Logged_In'] == token()) {echo $link.'administration/" title="'.l('administration').'">'.l('administration').'</a> '.l('divider').' ';}
   $categorySEF = get_id('category'); $articleSEF = get_id('article'); $home = s('home_sef');
   echo (!empty($categorySEF) || $categorySEF == $home || !empty($articleSEF)) ? $link.'" title="'.l('home').'">'.l('home').'</a>' : l('home');
   $categoryName = retrieve('name', 'categories', 'seftitle', $categorySEF);
   if (!empty($categoryName)) {
      echo ' '.l('divider').' '.(!empty($articleSEF) ? $link.$categorySEF.'/" title="'.$categoryName.'">'.$categoryName.'</a>' : $categoryName);
   }
   $articleTitle = retrieve('title', 'articles', 'seftitle', $articleSEF);
   if (!empty($articleTitle)) {echo ' '.l('divider').' '.$articleTitle;}
   if (check_category($categorySEF) == true && $categorySEF != $home && $categorySEF != 'administration') {echo ' '.l('divider').' '.l($categorySEF);}
   echo '</div>';
}
And the CSS:
Quote
.bread {color:#303030;margin-bottom:0.5em;border:1px solid #999;background: #F9F8F8;border: 1px solid #ccc;padding:4px 0 4px 1.9em;}
.bread a {color:#707070;text-decoration:none;}
.bread a:hover {color:#ccc;text-decoration:underline;}
And while logged in everythings dandy. When I logout the first START (which would be HOME normally) do not show, until I go deeper, sort of one level down, then all things operate as usual, say I click contact, then the breadcrumbs say start - contact, but when backing up to the frontpage, it's not there...

So I took the div code in the function away, and then it works... Is it wrong with my adding this where I added it, or what ?
« Last Edit: August 22, 2007, 01:41:29 am by Phil Martin »
Logged
"It's only dead fish that goes with the flow... "
Updated

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Adding a div in breadcrumbs, but...
« Reply #1 on: May 24, 2007, 12:48:34 pm »

Or one could possibly, mayby, perhaps code it the way it's supposed to be coded... Like closing the DAAAAAAAAMN tags before posting it here on the forum... (thanks, Phil)... I feel even more stupid than I usually am :lol: Ahh, well... this is on me, enjoy, folks
Logged
"It's only dead fish that goes with the flow... "
Updated

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Adding a div in breadcrumbs, but...
« Reply #2 on: May 24, 2007, 02:10:03 pm »

:P
Logged
Of all the things I have lost, it is my mind that I miss the most.

howdidyouguess

  • Newbie
  • *
  • Karma: 0
  • Posts: 23
Adding a div in breadcrumbs, but...
« Reply #3 on: June 11, 2007, 10:37:01 am »

Hahahaha.......
Logged