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: How to disable "home" in breadcrumbs navigation?  (Read 6395 times)

AgniZ

  • Newbie
  • *
  • Karma: 0
  • Posts: 40
How to disable "home" in breadcrumbs navigation?
« on: October 17, 2006, 04:21:31 PM »

friends... is there any way for not displaying HOME at breadcrumbs while you are at HOME page... i.e. I think it is a little OVER to see the screen with a HOME in the category section, another HOME at Page line and another HOME at breadcrumbs...
AgniZ
Logged

bramsyuur

  • Hero Member
  • *****
  • Karma: 23
  • Posts: 873
    • http://snews.vietbee.net
How to disable "home" in breadcrumbs navigation?
« Reply #1 on: October 18, 2006, 07:56:20 AM »

Hi AgmiZ,
Well, I've moddified the current "breadcrumbs" function in two modes, first, no "home"
was showed anymore, and the sedond, only "home" are showed when your are in home.
Try the best for you.
The first:
Code: [Select]
//BREADCRUMBS
function breadcrumbs() {
$link = ' if ($_SESSION[db('website').'Logged_In'] == 'True') {echo $link.'administration/" title="'.l('administration').'">'.l('administration').' '.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').'' : l('home');
$categoryName = retrieve('name', 'categories', 'seftitle', $categorySEF);
if (!empty($categoryName)) {
echo ' '.l('divider').' '.(!empty($articleSEF) ? $link.$categorySEF.'/" title="'.$categoryName.'">'.$categoryName.'' : $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);}
if (check_category($categorySEF) == true && $categorySEF != $home && $categorySEF != 'administration') {echo ' '.l($categorySEF);}
}
The second:
Code: [Select]
//BREADCRUMBS
function breadcrumbs() {
$link = ' if ($_SESSION[db('website').'Logged_In'] == 'True') {echo $link.'administration/" title="'.l('administration').'">'.l('administration').' '.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').'' : l('home');
$categoryName = retrieve('name', 'categories', 'seftitle', $categorySEF);
if (!empty($categoryName)) {
echo ' '.l('divider').' '.(!empty($articleSEF) ? $link.$categorySEF.'/" title="'.$categoryName.'">'.$categoryName.'' : $categoryName);
}
$articleTitle = retrieve('title', 'articles', 'seftitle', $articleSEF);
// if (!empty($articleTitle)) {echo ' '.l('divider').' '.$articleTitle;}
if (!empty($articleTitle)) {echo ' '.$articleTitle;}
// if (check_category($categorySEF) == true && $categorySEF != $home && $categorySEF != 'administration') {echo ' '.l('divider').' '.l($categorySEF);}
if (check_category($categorySEF) == true && $categorySEF != 'administration') {echo ' '.l($categorySEF);}
if (check_category($categorySEF) == '' && $categorySEF != $home && $categorySEF != 'administration') {echo ' '.l(home);}
}
Thanks,
bram.
Logged
La comunidad sNews en tu idioma!
Comunidad sNews en Espaņol

AgniZ

  • Newbie
  • *
  • Karma: 0
  • Posts: 40
How to disable "home" in breadcrumbs navigation?
« Reply #2 on: October 18, 2006, 03:48:44 PM »

hey, thanks... but do you have a RC2 version of this MOD?
Agniz
Logged

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
How to disable "home" in breadcrumbs navigation?
« Reply #3 on: October 18, 2006, 04:03:38 PM »

[topic title changed to more descriptive one]

afaik, you can use it in RC2 as well
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

TheTick

  • Full Member
  • ***
  • Karma: 6
  • Posts: 105
How to disable "home" in breadcrumbs navigation?
« Reply #4 on: October 18, 2006, 04:09:39 PM »

And why is "home" both a page and a category? That always bugs me, semantically speaking...
Logged

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
How to disable "home" in breadcrumbs navigation?
« Reply #5 on: October 18, 2006, 04:20:20 PM »

HOME is a default category used for almost every type of contents generated by sNews engine.

If you don't like it, you can change it's name via admin panel -> site settings -> Home SEF (used as link to Home)
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

AgniZ

  • Newbie
  • *
  • Karma: 0
  • Posts: 40
How to disable "home" in breadcrumbs navigation?
« Reply #6 on: October 19, 2006, 01:22:22 AM »

bramsyuur, well, what I need is not show HOME when I am at Home... what can I do? in fact, I would not like to show breadcrumbs when I am home...
Logged

bramsyuur

  • Hero Member
  • *****
  • Karma: 23
  • Posts: 873
    • http://snews.vietbee.net
How to disable "home" in breadcrumbs navigation?
« Reply #7 on: October 19, 2006, 02:45:23 AM »

AgniZ:
Look again my post, please.
Use "The first" code. With this one, no home was showed anymore...
bram.
Logged
La comunidad sNews en tu idioma!
Comunidad sNews en Espaņol

AgniZ

  • Newbie
  • *
  • Karma: 0
  • Posts: 40
How to disable "home" in breadcrumbs navigation?
« Reply #8 on: October 26, 2006, 02:46:05 AM »

brams... sorry , I had understood in another way. Now, it works ! Thanks a lot ! :lol:
Logged