Index tab should be invisible

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
tuur66
Posts: 50
Joined: Fri 17. Dec 2004, 15:01
Location: Amsterdam

Index tab should be invisible

Post by tuur66 »

Hi all,
I almost finished a website for one of my clients, using phpwcms. There's only one thing that I want to improve: the website starts with a homepage that will direct you to the site itself in 3 seconds (or immediately if you click on the logo). In the website the navigation tabs are shown, including the Index tab. I do not want that: it must be invisible in the navigation menu. But how can I do that? In admin there is no way you can change this.
Pappnase

Post by Pappnase »

hello

create an structurelevel called home with the redirection to the index.php
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi,

please have a look: http://faq.phpwcms-docu.de/14_61_en.html

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
tuur66
Posts: 50
Joined: Fri 17. Dec 2004, 15:01
Location: Amsterdam

Post by tuur66 »

Hi guys, no, those thngs don't work, forget about the redirecting thing, I simply want to get rid of the Index tab in the menu. There must be a way to make it invisible?
tuur66
Posts: 50
Joined: Fri 17. Dec 2004, 15:01
Location: Amsterdam

Post by tuur66 »

Please, take a look at http://www.nagoya.nl/wcms/index.php?_welkom! And it is the Home tab (linking to the splash screen) that must not be shown in the navigation.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi,

you can´t do it using the NAV_LIST_TOP.

But using NAV_LIST_FROM solves your problem.

{NAV_LIST_FROM:0:1::list_top}
The source text which you need: http://www.phpwcms.de/forum/viewtopic.php?p=61475#61475

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
tuur66
Posts: 50
Joined: Fri 17. Dec 2004, 15:01
Location: Amsterdam

Post by tuur66 »

OK, thanks. It's not quite clear what I should do so I copied the php text into a file which I named reptag_nav_list_from.php. I put that file in "/phpwcms_template/inc_script/frontend_render".

Could you please tell me step by step what to do? Where does it say NAV_LIST_TOP which I can then change into NAV_LIST_FROM:0:1::list_top. Maybe just tell me the name of the file, that would be a good start!

Thanks in advance!
User avatar
Heiko H.
Posts: 868
Joined: Thu 27. Oct 2005, 11:41
Location: Dresden
Contact:

Post by Heiko H. »

Hi,

put this:

Code: Select all

<?php 

if( ! ( strpos($content["all"],'{MY_LEVEL_NAV')===false ) ) { 

   $complexNav0 = "<ul class=\"levelClass0\">&nbsp;</ul>"; 
   $complexNav1 = "<ul class=\"levelClass1\">&nbsp;</ul>"; 
   $complexNav2 = "<ul class=\"levelClass2\">&nbsp;</ul>"; 
   $complexNav3 = "<ul class=\"levelClass3\">&nbsp;</ul>"; 
   $complexNav4 = "<ul class=\"levelClass4\">&nbsp;</ul>"; 
   $complexNav  = ""; 

   // equal template_defaults for all NAV_ROW 
   // don't forget to use $GLOBALS when using this in function 
   // like: $GLOBALS['template_default']["nav_row"]["after"] 
   // and : $GLOBALS['LEVEL_ID'] 
$template_default["nav_row"]["before"]				= '';
$template_default["nav_row"]["after"]				= '';
$template_default["nav_row"]["between"]				= '';
$template_default["nav_row"]["link_before"]			= '';
$template_default["nav_row"]["link_after"]			= '';
$template_default["nav_row"]["link_before_active"]	= '<span class="navRow_active">';
$template_default["nav_row"]["link_after_active"]	= '</span>';
$template_default["nav_row"]["link_direct_before"]			= '';
$template_default["nav_row"]["link_direct_after"]			= '';
$template_default["nav_row"]["link_direct_before_active"]	= '';
$template_default["nav_row"]["link_direct_after_active"]	= '';

   foreach($LEVEL_ID as $depth => $thisStructureID) { 

      switch($depth) { 

         case 0: // Top Level 
               $template_default["nav_row"]["before"]            = ''; 
               $complexNav0 = nav_level_row($thisStructureID,0); 
               $complexNav .= $complexNav0; 

               break; 

         case 1: // 1st Level 
               $template_default["nav_row"]["before"]            = '<ul class="levelClass1">'; 
               $complexNav1 = nav_level_row($thisStructureID,0); 
               $complexNav .= $complexNav1; 
               if( trim( $complexNav1 ) == "" ) { 
                 $complexNav1 .= $template_default["nav_row"]["before"] . "&nbsp;</ul>"; 
               } 

               break; 

         case 2: // 2nd Level 
               $template_default["nav_row"]["before"]            = '<ul class="levelClass2">'; 
               $complexNav2 = nav_level_row($thisStructureID,0); 
               $complexNav .= $complexNav2; 
               break; 

         case 3: // 3rd Level 
               $template_default["nav_row"]["before"]            = '<ul class="levelClass3">'; 
               $complexNav3 = nav_level_row($thisStructureID,0); 
               $complexNav .= $complexNav3; 
               break; 

         case 4: // 4th Level 
               $template_default["nav_row"]["before"]            = '<ul class="levelClass4">'; 
               $complexNav4 = nav_level_row($thisStructureID,0); 
               $complexNav .= $complexNav4; 
               break; 

      } 
   } 

   $content["all"] = str_replace('{MY_LEVEL_NAV}', $complexNav, $content["all"]); 
   $content["all"] = str_replace('{MY_LEVEL_NAV:0}', $complexNav0, $content["all"]); 
   $content["all"] = str_replace('{MY_LEVEL_NAV:1}', $complexNav1, $content["all"]); 
   $content["all"] = str_replace('{MY_LEVEL_NAV:2}', $complexNav2, $content["all"]); 
   $content["all"] = str_replace('{MY_LEVEL_NAV:3}', $complexNav3, $content["all"]); 
   $content["all"] = str_replace('{MY_LEVEL_NAV:4}', $complexNav4, $content["all"]); 

} 

?>
in a file eg. mylevelnav.php
in phpwcms_template/inc_script/frontend_render/
The RT you need calls {MY_LEVEL_NAV:0}.
Use something like <span class="navRow">{MY_LEVEL_NAV:0}</span> in your template and .navRow{} .navRow_active{} in your frontend.css.

This hint based on:http://www.phpwcms.de/forum/viewtopic.p ... mylevelnav


THX kiwix again...

Sorry for not "cleaning" the code. I only needed the "case0" and sorry for this english too :oops:


Heiko...
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi tuur66,

it´s quit easy. 20 sec.

at your Backend -> Admin -> template: Please replace the string {NAV_LIST_TOP} to {NAV_LIST_FROM:0:1::list_top}

That´s all and it should work.

At conf.inc.php please set:

Code: Select all

$phpwcms["allow_ext_render"]  = 1;  //allow including of custom external scripts at frontend rendering 
@Heiko H. :D
er verwendet doch den NAV_LIST_TOP, hat also auch alle classen dazu schon parat. Also braucht er nur diesen RT einzusetzen und es funktioniert.

Gruß Knut
Last edited by flip-flop on Fri 31. Mar 2006, 06:42, edited 1 time in total.
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
Heiko H.
Posts: 868
Joined: Thu 27. Oct 2005, 11:41
Location: Dresden
Contact:

Post by Heiko H. »

@flip-flop

sorry, wollt mich nicht "vordrängeln"... :oops:

Heiko...
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

@ Heiko H., :D

ne, meinte ich nicht so, deine Lösung finde ich ok. Ich denke nur es muss so einfach wie möglich sein, das entnehme ich aus seiner Fragestellung.

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
tuur66
Posts: 50
Joined: Fri 17. Dec 2004, 15:01
Location: Amsterdam

Post by tuur66 »

ja, dass ist richtig! :)
es hat aber nicht geklappt...
I did what you (flip flop) suggested, changed NAV_LIST_TOP into NAV_LIST_FROM:0:1::list_top in the backend and added
$phpwcms["allow_ext_render"] = 1; //allow including of custom external scripts at frontend rendering
in my conf.inc.php... That last step doesn't seem right, I don't want to include any external stuff (rather, as I said, the opposite). Any further clues?
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi tuur66,

please change these lines don´t add!

Code: Select all

$phpwcms["allow_ext_init"]    = 1;  //allow including of custom external scripts at frontend initialization
$phpwcms["allow_ext_render"]  = 1;  //allow including of custom external scripts at frontend rendering 
For me the entries are at line-number ~ 47/48 in conf.inc.php (V1.26)

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
tuur66
Posts: 50
Joined: Fri 17. Dec 2004, 15:01
Location: Amsterdam

Post by tuur66 »

hey knut,
okay, danke... bei mir ist es auch linien 47 und 48.
there it says:
$phpwcms["allow_ext_init"] = 1; //allow including of custom external scripts at frontend initialization
$phpwcms["allow_ext_render"] = 1; //allow including of custom external scripts at frontend rendering
. both have to be checked for being numbered 1 rather than 0, I suppose. I removed the added extra line. Stil it doesn't work: still all navigation has gone.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi,

at first please insert into the file reptag_nav_list_from.php at the end these two characters ?> :oops: :oops:

Second: what is your ID from the first Level after Home?

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Post Reply