Page 2 of 2
Posted: Sun 30. Jan 2005, 17:44
by cyrano
thank you oliver.
ok, i will still waiting when integrated in final version i hope.
hope to make some templates for use with version 2.
Posted: Sun 30. Jan 2005, 19:16
by frold
I have now modified the script but I dont know howto control the active level with css...
http://www.frold.lir.dk/jopav2
I have modified the script to:
Code: Select all
$template_default["nav_row"]["after"] = '</td></tr>';
$template_default["nav_row"]["between"] = "\n";
$template_default["nav_row"]["link_before"] = '';
$template_default["nav_row"]["link_after"] = '';
$template_default["nav_row"]["link_before_active"] = '<ul class="active">';
$template_default["nav_row"]["link_after_active"] = '</ul>';
$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"] = '<tr><td class="levelClass0">';
$complexNav .= nav_level_row($thisStructureID,0);
break;
and that gives me this code:
<tr><td class="levelClass0"><ul class="active"><a href="index.php?produkter">Produkter</a></ul>
<a href="index.php?kobonline">Køb online</a>
<a href="index.php?firmadata">Firmadata</a>
<a href="index.php?ansatte">Ansatte</a></td></tr>
I have this: CSS
Code: Select all
#topmenudiv{
width: 760px;
margin: auto;
border-left: 1px solid #000000;
border-right: 1px solid #000000;
border-bottom: 1px solid #000000;
border-top: 1px solid #000000;
background: #ffffff;
}
.levelClass0 {
background-image: url('../../images/menubg.gif');
height: 25px;
border-bottom: 1px solid #000000;
}
.levelClass0 a:link, .levelClass0 a:visited, .levelClass0 a:active {
color: #000000;
text-transform: uppercase;
display: block;
float: left;
text-decoration: none;
border-right: 1px solid #000000;
background-image: url('none');
font-style: normal;
font-variant: normal;
font-weight: bold;
font-size: 10px;
font-family: tahoma;
padding-left: 10px;
padding-right: 10px;
padding-top: 7px;
padding-bottom :6px;
}
.levelClass0 a:hover {
color: #000000;
background: url('../../images/menubg_active.gif');
}
.levelClass0 a.active:link, .levelClass0 a.active:visited, .levelClass0 a.active:active {
background: url('../../images/menubg_active.gif');
text-transform: uppercase;
display: block;
float: left;
text-decoration: none;
border-right: 1px solid #000000;
font-style: normal;
font-variant :normal;
font-weight: bold;
font-size: 10px;
font-family: tahoma;
padding-left: 10px;
padding-right: 10px;
padding-top: 7px;
padding-bottom: 6px;
}
.levelClass0 a.active:hover {
color: #000000;
}
Posted: Sun 30. Jan 2005, 20:55
by Oliver Georgi
instead of using this:
Code: Select all
$template_default["nav_row"]["link_before_active"] = '<ul class="active">';
$template_default["nav_row"]["link_after_active"] = '</ul>';
use something like:
Code: Select all
$template_default["nav_row"]["link_before_active"] = '<div class="activeLevel">';
$template_default["nav_row"]["link_after_active"] = '</div>';
Oliver
Posted: Sun 30. Jan 2005, 21:14
by frold
Oliver Georgi wrote:instead of using this:
Code: Select all
$template_default["nav_row"]["link_before_active"] = '<ul class="active">';
$template_default["nav_row"]["link_after_active"] = '</ul>';
use something like:
Code: Select all
$template_default["nav_row"]["link_before_active"] = '<div class="activeLevel">';
$template_default["nav_row"]["link_after_active"] = '</div>';
Oliver
yahhoooooooo - so much thank you...!!
It works - I just use this in my css:
.levelClass0 .activeLevel a:link, .levelClass0 .activeLevel a:visited, .levelClass0 .activeLevel a:active {
Posted: Fri 4. Feb 2005, 02:35
by wireless
ok, i give!
how do I get it to look like this?
Section1 | Section2 | Section3
subsection2 : subsection2 : subsection2
Example is like the user clicked on Section2
Posted: Fri 4. Feb 2005, 08:30
by Oliver Georgi
see all template defaults for NAV_ROW:
Code: Select all
$template_default["nav_row"]["before"] = '<div class="level">';
$template_default["nav_row"]["after"] = '</div>';
$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="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"] = '';
Now all you have to do is change the settings for each level in the "case" as posted above:
Code: Select all
$template_default["nav_row"]["before"] = '<div class="levelNext">';
$template_default["nav_row"]["after"] = '</div>';
$template_default["nav_row"]["between"] = " : ";
$template_default["nav_row"]["link_before_active"] = '<span class="activeNext">';
$template_default["nav_row"]["link_after_active"] = '</span>';
Oliver
Posted: Sun 6. Feb 2005, 19:40
by cyaneo
Hi,
this is what I'm looking for (cause I want tableless menus), but only one thing I cannot realize:
If I klick on "Services" (to open the submenu), my Navigation should be:
- About
- Services
+-
Service 1
+-
Service 2
+-
Service 3
+-
Service 4
- Find us
- Feedback
but it looks like this:
- About
- Services
- Find us
- Feedback
+-
Service 1
+-
Service 2
+-
Service 3
+-
Service 4
My site structure:
- About
- Services
+- Service 1
+- Service 2
+- Service 3
+- Service 4
- Find us
- Feedback
So the submenus doesn't open under "services", they opens at the end of the navigation...
How can it be done?
Thank you in advantage.
Posted: Sun 6. Feb 2005, 19:47
by Oliver Georgi
check this - this is what you are searching for (I think so):
http://www.phpwcms.de/forum/viewtopic.php?p=32037#32037
Oliver
Posted: Sun 6. Feb 2005, 20:09
by cyaneo
Great, oliver!!!8)
Thank you 1000times!
Posted: Sun 13. Feb 2005, 17:59
by aborre
Hi Oliver,
could you perhaps post an example how to control, that only sublevels are given out, resp. suppressed (f.ex. on base of NAV_ROW).
Or do I have to make templates for each toplevelpage and than to work with NAV_LIST_CURRENT ?
Thanks beforehand
aborre
Posted: Sun 13. Feb 2005, 18:37
by Oliver Georgi
not neccessary to implement additional templates. Please ask a real question - I do not have time to read all posts to get to know what you want to know.
Oliver
Posted: Sun 13. Feb 2005, 20:54
by aborre
Sorry if I'm not clear.
But what I mean is simply this thread. I dont know how to bring it to work, that sublevels are shown without the parent level in a vertical navigation.
as frold wrote:
What I need is a tag that output just
Toplevel
and another on that output just
Sublevel
basted on toplevel, if a toplevel is choosed
and so on...
I've read the thread, made the changes but now dont know how the replacement tag has to look. {MY_LEVEL_NAV} alone does'nt do it for me.
Are there some other parameters I have to set?
aborre
Posted: Sun 13. Feb 2005, 22:19
by Oliver Georgi
use:
Code: Select all
{NAV_ROW} -> means start at Top Level
{NAV_ROW:CURRENT:0} - show menu for current level without parent level link
{NAV_ROW:CURRENT:1} - show menu for current level with parent level link
{NAV_ROW:LevelID:0} - show menu for specific level without parent level link
{NAV_ROW:LevelID:1} - show menu for specific level with parent level link
Oliver