Index tab should be invisible
Index tab should be invisible
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.
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.
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
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.
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
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 )
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!
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!
Hi,
put this:
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
Heiko...
put this:
Code: Select all
<?php
if( ! ( strpos($content["all"],'{MY_LEVEL_NAV')===false ) ) {
$complexNav0 = "<ul class=\"levelClass0\"> </ul>";
$complexNav1 = "<ul class=\"levelClass1\"> </ul>";
$complexNav2 = "<ul class=\"levelClass2\"> </ul>";
$complexNav3 = "<ul class=\"levelClass3\"> </ul>";
$complexNav4 = "<ul class=\"levelClass4\"> </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"] . " </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 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
Heiko...
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:
@Heiko H.
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
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
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 )
@ Heiko H.,
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
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 )
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
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
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?$phpwcms["allow_ext_render"] = 1; //allow including of custom external scripts at frontend rendering
Hi tuur66,
please change these lines don´t add!
For me the entries are at line-number ~ 47/48 in conf.inc.php (V1.26)
Gruß Knut
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
Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
hey knut,
okay, danke... bei mir ist es auch linien 47 und 48.
there it says:
okay, danke... bei mir ist es auch linien 47 und 48.
there it says:
. 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.$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
Hi,
at first please insert into the file reptag_nav_list_from.php at the end these two characters ?>
Second: what is your ID from the first Level after Home?
Gruß Knut
at first please insert into the file reptag_nav_list_from.php at the end these two characters ?>
Second: what is your ID from the first Level after Home?
Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )