td-menu replacement tag

Use GitHub to post feature requests for phpwcms.
cyrano
Posts: 1598
Joined: Sat 31. Jan 2004, 18:33
Location: Stuttgart
Contact:

Post 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.
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post 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;
	}	
http://www.studmed.dk Portal for doctors and medical students in Denmark
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post 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...!! :D

It works - I just use this in my css:
.levelClass0 .activeLevel a:link, .levelClass0 .activeLevel a:visited, .levelClass0 .activeLevel a:active {
http://www.studmed.dk Portal for doctors and medical students in Denmark
User avatar
wireless
Posts: 138
Joined: Sun 24. Oct 2004, 04:35
Location: Houston, Texas

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
cyaneo
Posts: 128
Joined: Sun 6. Feb 2005, 01:23
Contact:

Post 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.
Gruss
cyaneo
Zen Cart - The Art of e-Commerce

Wenn jeder dem anderen helfen wollte, wäre allen geholfen.
-------------------------------------------
Ein Problem ist halb gelöst, wenn es klar formuliert ist.
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
cyaneo
Posts: 128
Joined: Sun 6. Feb 2005, 01:23
Contact:

Post by cyaneo »

8) Great, oliver!!!8)

Thank you 1000times!
Gruss
cyaneo
Zen Cart - The Art of e-Commerce

Wenn jeder dem anderen helfen wollte, wäre allen geholfen.
-------------------------------------------
Ein Problem ist halb gelöst, wenn es klar formuliert ist.
aborre
Posts: 52
Joined: Thu 25. Nov 2004, 16:26

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
aborre
Posts: 52
Joined: Thu 25. Nov 2004, 16:26

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Locked