Page 1 of 2

Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Fri 25. Apr 2008, 20:51
by spielplan
Hallo zusammen,

zum lernen habe ich mir das Template von WeizelMedia (layout07)
heruntergeladen. Die Navigation dazu stammt, soweit ich das richtig
verstanden habe von FlipFlop.

Mit der Navigation habe ich ein paar Probleme. Dazu mal ein Bild:
Image

Kann ich die gewünschen Änderungen mit Hilfe von css erreichen
(nlu_hcss07_2.css, nlu_navi02_2.css, layout07_2.css), oder muss
man dafür an einer anderen Stelle ansetzen?

Viele Grüße!
Spielplan

Re: Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Fri 25. Apr 2008, 21:34
by Jensensen
zum breadcrumb: --> {BREADCRUMB:ID}
http://www.phpwcms-docu.de/index.php?aid=41


Bold klappt nicht, ausser ggf. mit einer pseudo class im CSS file:

Code: Select all

#bread a:last-child {font-weight: bold;}
wobei html bspw.:

Code: Select all

<div id="bread">{BREADCRUMB:ID}</div>
was wiederum u.U. nicht von allen web browsern "verstanden" wird.

für weitere infos --> warten auf antworten von flip-flop, weizel...

Re: Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Fri 25. Apr 2008, 22:35
by KeineAhnung
Ich habe das so gemacht.

Code: Select all

<span class="ist">{BREADCRUMB}</span>
Dabei auf #666 gesetzt, so das der letzte Eintrag heller ist. Bisher gab es keine Probleme mit anderen Browsern.

Re: Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Fri 25. Apr 2008, 23:08
by Jensensen
Hallo KeineAhnung,

kannste mal

.ist sowie
#666

näher erklären (zeigen)?
Dankeee

Re: Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Sat 26. Apr 2008, 11:06
by KeineAhnung
Hallo Jensensen,
entschuldige meinen knappen Beitrag.
In meinem class-Selektor .ist steht

Code: Select all

  {
padding: 0 0 10px 0;
color: #666;
font-size: 14px;
} 
#666 ist eine Farbangabe im Graubereich.

Re: Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Sat 26. Apr 2008, 11:35
by Jensensen
Hallo, moin,
war alles Unsinn, was ich oben geschrieben habe, da der letzte "Brotkrümel" gar nicht als Link in der Seite erscheint. Aber Du bringst mich gerade auf eine Idee, wie man eben den letzten Eintrag im BREADCRUMB fett dargestellt bekommt, was ja ein Teil der Frage war:
KeineAhnung wrote:.ist {
padding: 0 0 10px 0;
color: #666;
font-size: 14px;
font-weight: bold;
}
also alles bold und die links aber wieder
.ist a { font-weight: normal; }
und HTML

Code: Select all

<div class="ist">{BREADCRUMB:1}</div>
So müsste es eigentlich klappen...

Re: Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Sat 26. Apr 2008, 11:53
by KeineAhnung
Genau so habe ich es gemacht. Nur sollte color: #666; in color: #000; geändert werden. Muss aber spielplan selber wissen.

Re: Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Sat 26. Apr 2008, 16:53
by flip-flop
@spielplan: Ich würde heute diese Navi nicht mehr verwenden sondern die {NAV_HORIZ_DD} -> http://forum.phpwcms.org/viewtopic.php?f=1&t=16080

Re: Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Sun 27. Apr 2008, 12:43
by spielplan
Vielen Dank für die Hilfestellung.
Habe soweit alles hinbekommen.

Beim Experimentieren mit dem Breadcrump
habe ich dann festgestellt, das eine Navigation
dieser Art noch übersichtlicher wäre:
Image

Kann ich diese Art der Darstellung mit {NAV_HORIZ_DD:0}
erreichen, oder muss dazu vielleicht {NAV_LIST_UL:HCSS}
einsetzen?

@flip-flop
Nur für mich zum Verständnis. Ist das RT {NAV_HORIZ_DD:0}
von Dir oder von Oliver? Oder handelt es sich dabei um eine
verbesserte Version von {NAV_LIST_UL:HCSS}?


Viele Grüße!
Spielplan

Re: Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Sun 27. Apr 2008, 14:02
by flip-flop
{NAV_HORIZ_DD:0} ist von Oliver entwickelt, ich habe die NAVI lediglich dokumentiert und etwas erweitert.

Das was du möchtest geht recht einfach mit der {NAV_LIST_UL ......

{NAV_LIST_UL:,0,2,navig twolevel,selected} [EDIT 05.05.08] <div class="navig">{NAV_LIST_UL:,0,2,,selected}</div> [/EDIT]

Code: Select all

/* 27.06.07  Horizontales Menü mit einer horiz. Unterebene
	Navigation core 	
  http://www.phpwcms.de/forum/viewtopic.php?p=88630#88630
  [EDIT 05.05.08 KH: ] 
  - All ".navig" converted to ".navig ul"
  - Call: <div class="navig">{NAV_LIST_UL:,0,2,,selected}</div> 
  [/EDIT]
 */

.navig {
	line-height: 1;
	margin: 0 0 1.2em 50px; /* -- EDIT --  */
	display: block;
	position: relative;
	width: 500px;  /*  -- EDIT --  */
}

/* remove all list stylings */
.navig ul, .navig ul ul {
	margin: 0;
	padding: 0;
	border: 0;
	list-style-type: none;
}

/* move all list items into one row, by floating them */
.navig ul li {
	margin: 0;
	padding: 0 1px;
	border: 0;
	display: block;
	float: left;
	background: url(../../picture/navi/menubg.gif) repeat-x;
}

/* initialy hide all sub menus */
.navig ul ul {
	width: 100%;
	display: block;
	visibility: hidden; /* [EDIT] change to visible; if you want to show the sub menu line always, else hidden; [/EDIT] */

	position: absolute;
	clear: both;
	top: 1.8em;/* watch for this value! you must make sure that this value and value of line-height for the parent items are such that it is possible to move the mouse over to submenu */
	left: 0;
}

/* -- float.clear -- force containment of floated LIs inside of main UL */
.navig ul:after {
	content: ".";
	height: 0;
	display: block;
	visibility: hidden;
	overflow: hidden;
	clear: both;
}
/* -- float.clear.END --  */

.navig ul li.selected ul, .navig ul li:hover ul {
	visibility: visible;
}

.navig ul li.selected ul {
	z-index: 10;
}

.navig ul li:hover ul {
	z-index: 100;
}

/*		Navigation make-up 	*/

.navig ul {
	font-size: 12px;
	font-weight: bold;
	color: #fff;
	background: url(../../picture/navi/menubg.gif) repeat-x;
	margin: 0em auto 2em;
	padding: 0 1em;
	width: 550px;	/* this value should be close to what is needed for elements to stay on one line */
}

.navig ul a {
	color: #fff;
	text-decoration: none;
	padding: 1em 5px 1.05em; /*THIS DEFINES NAV LI HEIGHT*/
	display: block;
	text-transform: uppercase;
}

.navig ul li {
	margin: 0;
	/*border-right: 1px dotted #fff;*/
}
.navig ul li li{
border: 0px;
}

/* if the following selector was ".navig ul li:hover a" IE7 will NOT render nested UL! the reason is the background-color rule. */
.navig ul li:hover {
	color: #000;
	background-color: #cde;
}
/* which is why the link is styled separatelly */
.navig ul li:hover a {
	color: #FFF;
}

.navig ul li:hover ul {
	background-color: #cde;
}

/* always pay attention that the value for top is such that it is possible to move the mouse over to submenu */
.navig ul ul {
	top: 3em;
	padding: 0 1em;/* should be identical to .navig ul, for best results */
	color: #FFF;
	width: 550px;
}

.navig ul li li {
	padding: 0 6px;
	background: url(../../picture/navi/sub_bg.gif) repeat-x;
}

.navig ul li ul {
	background: url(../../picture/navi/sub_bg.gif) repeat-x;
}

.navig ul li li a {
	color: #000;
	padding: 0.3em;
	font-family: sans-serif, 'Arial';
	font-size: 11px;
	text-transform: none;
}

/* fix the colors for selected item and submenu, for better usability */

.navig ul li.selected li a, .navig ul li.selected li a:hover {
	color: #FFF;
	background: url(../../picture/navi/sub_bg.gif) repeat-x;
}

.navig ul li.selected li, .navig ul li.selected:hover li a, .navig ul li.selected ul {
	background: url(../../picture/navi/sub_bg.gif) repeat-x;
	text-decoration:none;
}

.navig ul li li.selected, .navig ul li.selected:hover li.selected a, .navig ul li li.selected a{
  background: url(../../picture/navi/sub_hover_bg.gif);
}
.navig ul li.selected li a:hover, .navig ul li.selected:hover li a:hover{
color: #eee;
}


/* IE5/Mac: \*//*/

.navig ul {
	display: inline-block;
}

.navig ul a {
	float: left;
}

.navig ul li ul {
	top: 1.8em;
	height: 2em;
}

.navig ul li li, .navig ul li li a {
	display: inline;
	float: none;
}

/*  */
-> http://www.phpwcms.de/forum/viewtopic.php?p=88630#88630

[EDIT spielplan]
Ich wollte zudem noch erreichen, daß das Submenü nach dem Anklicken eines Sub-Menüpunktes
stehen bleibt. Verbessert die übersichtlichkeit doch ganz erheblich. Wie ich finde.
Für alle die es interessiert:

Und dann noch den aktiven Sub-Menüpunkt in fett darstellen:

Code: Select all

    li.selected a  {
        font-weight: bold;
        }
[/EDIT]

Knut

Re: Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Sun 27. Apr 2008, 15:23
by spielplan
Also bei mir funktioniert das nicht so richtig.
Für was ist eigentlich "twolevel"? In der css
taucht das nicht auf.

Ich habe das Menü wie folgt eingebunden:

Code: Select all

<div class="navig"> 
{NAV_LIST_UL:,0,2,navig twolevel,selected}
</div>
Das sollte doch richtig sein?

Viele Grüße
Spielplan

Re: Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Sun 27. Apr 2008, 16:03
by flip-flop
@string $parameter =
"menu_type, start_id, max_level, class_path, class_active, ul_id_name, wrap_ul_div(0 = off, 1 = <div>, 2 = <div id="">), wrap_link_text(<em>|</em>)"

E.g.: {NAV_LIST_UL:F, 19, 10, NLU_CSS, NLU_ACT, NLU_ID, 2, <em>|</em>}

Du kannst twolevel streichen, ist in diesem Zusammengang nicht wichtig.

Du brauchst bei diesem Ansatzt den umschließenden Container nicht. Das Bsp. oben soll eigentlich auch nur verdeutlichen wie man so etwas machen kann.

{NAV_LIST_UL:,0,2,navig,selected,active}

Die Klasse active muss noch eingepflegt werden wenn du diese brauchst.

Re: Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Sun 27. Apr 2008, 18:25
by spielplan
Also irgendwie bekomme ich das nicht so richtig hin, sorry...

Bis jetzt sieht das bei mir so aus:
Image

Die Hauptebenen 2-4 stehen bei mir unterhalb der der ersten, statt rechts davon.
Das muss natürlich per css justiert werden. Die erste Hauptebene beansprucht
aber fast die ganze Breite für sich. In der css sehe ich keine Möglichkeit dies
zu ändern.

Für was sind eigentlich die beiden Klassen "sub_no" und "sub_ul" gut?
In der css sind keine entsprechenden Klassen aufgeführt. Und woher
kommen diese Klassen eigentlich?

Wenn ich das RT so plaziere:

Code: Select all

{NAV_LIST_UL:,0,2,navig,selected,}
steht da ja nichts von "sub_no" und "sub_ul" gut.

Hier mal der gerenderte Code:

Code: Select all

<ul id="active_0" class="navig">
	<li id="li_active_1" class="sub_ul navig selected"><a href="index.php?hallihallo-1">HalliHallo-1</a>
	<ul id="active_1" class="navig">
		<li id="li_active_4" class="sub_no"><a href="index.php?hallihallo-1-1">HalliHallo-1-1</a></li>
		<li id="li_active_5" class="sub_no"><a href="index.php?hallihallo-1-2">HalliHallo-1-2</a></li>
		<li id="li_active_6" class="sub_no"><a href="index.php?hallihallo-1-3">HalliHallo-1-3</a></li>

	</ul>
	</li>
	<li id="li_active_2" class="sub_ul"><a href="index.php?hallihallo-2">HalliHallo-2</a>
	<ul id="active_2">
		<li id="li_active_7" class="sub_no"><a href="index.php?hallihallo-2-1">HalliHallo-2-1</a></li>
		<li id="li_active_8" class="sub_no"><a href="index.php?hallihallo-2-2">HalliHallo-2-2</a></li>
	</ul>

	</li>
	<li id="li_active_3" class="sub_no"><a href="index.php?hallihallo-3">HalliHallo-3</a></li>
	<li id="li_active_16" class="sub_no"><a href="index.php?hallihallo-4">HalliHallo-4</a></li>
</ul>
Viele Grüße!
Spielplan

PS: Ich hoffe, der Gedudsfaden ist noch dran...?

Re: Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Sun 27. Apr 2008, 19:44
by spielplan
Das die Navigationspunkte nebeneinander stehen habe ich hinbekommen.

Code: Select all

    .navig {
       font-size: 12px;
       font-weight: bold;
       color: #fff;
       background: url(../../../picture/menubg.gif) repeat-x;
       margin: 0em auto 2em;
       padding: 0 1em;
       /*width: 700px;*/   /* this value should be close to what is needed for elements to stay on one line */
    }
Habe einfach "width" auskommentiert. Dann geht es...

Viele Grüße
Spielplan

Re: Frage zu NAV_LIST_UL von WeizelMedia und FlipFlop...

Posted: Mon 5. May 2008, 07:03
by spielplan
War ja klar, das es noch Probleme geben wird...

Problem 1:
Damit alle Hauptnavigationspunkte nebeneinander stehen, muss man "width" deaktivieren.
Das ist so, weil der aktive Hauptnavigationspunkt die Klasse "navig" nochmal zugewiesen
bekommt.

Gerenderter Code der kompletten Navigation:
<ul id="uff_0" class="navig">
<li id="li_uff_1" class="sub_ul"><a href="index.php?hallihallo-1">HalliHallo-1</a>
<ul id="uff_1">
<li id="li_uff_4" class="sub_no"><a href="index.php?hallihallo-1-1">HalliHallo-1-1</a></li>
<li id="li_uff_5" class="sub_no"><a href="index.php?hallihallo-1-2">HalliHallo-1-2</a></li>
<li id="li_uff_6" class="sub_no"><a href="index.php?hallihallo-1-3">HalliHallo-1-3</a></li>

</ul>
</li>
<li id="li_uff_2" class="sub_ul"><a href="index.php?hallihallo-2">HalliHallo-2</a>
<ul id="uff_2">
<li id="li_uff_7" class="sub_no"><a href="index.php?hallihallo-2-1">HalliHallo-2-1</a></li>
<li id="li_uff_8" class="sub_no"><a href="index.php?hallihallo-2-2">HalliHallo-2-2</a></li>
</ul>

</li>
<li id="li_uff_3" class="sub_ul"><a href="index.php?hallihallo-3">HalliHallo-3</a>
<ul id="uff_3">
<li id="li_uff_17" class="sub_no"><a href="index.php?HalliHallo-3-1">HalliHallo-3-1</a></li>
<li id="li_uff_18" class="sub_no"><a href="index.php?HalliHallo-3-2">HalliHallo-3-2</a></li>
</ul>
</li>

<!-- Weil hier die Klasse navig zugewiesen wird, bricht die Hauptnavigation um -->
<li id="li_uff_16" class="sub_ul navig selected"><a href="index.php?hallihallo-4">HalliHallo-4</a>
<ul id="uff_16" class="navig">
<li id="li_uff_19" class="sub_no"><a href="index.php?HalliHallo-4-1">HalliHallo-4-1</a></li>
<li id="li_uff_20" class="sub_no"><a href="index.php?HalliHallo-4-2">HalliHallo-4-2</a></li>
<li id="li_uff_21" class="sub_no"><a href="index.php?HalliHallo-4-3">HalliHallo-4-3</a></li>
</ul>
</li>

</ul>
Hier nochmal die entsprechende css. Ist die gleiche wie von FlipFlop weiter oben.

Code: Select all

    /* 27.06.07  Horizontales Menü mit einer horiz. Unterebene
          Navigation core    
      http://www.phpwcms.de/forum/viewtopic.php?p=88630#88630
    */

    .navig {
       line-height: 1;
       margin: 0 0 1.2em 0;
       display: block;
       position: relative;
    }

    /* remove all list stylings */
    .navig, .navig ul {
       margin: 0;
       padding: 0;
       border: 0;
       list-style-type: none;
    }

    /* move all list items into one row, by floating them */
    .navig li {
       margin: 0;
       padding: 0 1px;
       border: 0;
       display: block;
       float: left;
       background: url(../../../picture/menubg.gif) repeat-x;
    }

    /* initialy hide all sub menus */
    .navig ul {
       width: 100%;
       display: block;
       visibility: hidden;
       position: absolute;
       clear: both;
       top: 1.8em;/* watch for this value! you must make sure that this value and value of line-height for the parent items are such that it is possible to move the mouse over to submenu */
       left: 0;
    }

    /* -- float.clear -- force containment of floated LIs inside of main UL */
    .navig:after {
       content: ".";
       height: 0;
       display: block;
       visibility: hidden;
       overflow: hidden;
       clear: both;
    }
    /* -- float.clear.END --  */

    .navig li.selected ul, .navig li:hover ul {
       visibility: visible;
    }

    .navig li.selected ul {
       z-index: 10;
    }

    .navig li:hover ul {
       z-index: 100;
    }

    /*      Navigation make-up    */

    .navig {
       font-size: 12px;
       font-weight: bold;
       color: #fff;
       background: url(../../../picture/menubg.gif) repeat-x;
       margin: 0em auto 2em;
       padding: 0 1em;
       width: 550px;   /* this value should be close to what is needed for elements to stay on one line */
    }

    .navig a {
       color: #fff;
       text-decoration: none;
       padding: 1em 5px 1.05em; /*THIS DEFINES NAV LI HEIGHT*/
       display: block;
       text-transform: uppercase;
    }

    .navig li {
       margin: 0;
       /*border-right: 1px dotted #fff;*/
    }
    .navig li li{
    border: 0px;
    }

    /* if the following selector was ".navig li:hover a" IE7 will NOT render nested UL! the reason is the background-color rule. */
    .navig li:hover {
       color: #000;
       background-color: #cde;
    }
    /* which is why the link is styled separatelly */
    .navig li:hover a {
       color: #FFF;
    }

    .navig li:hover ul {
       background-color: #cde;
    }

    /* always pay attention that the value for top is such that it is possible to move the mouse over to submenu */
    .navig ul {
       top: 3em;
       padding: 0 1em;/* should be identical to .navig, for best results */
       color: #FFF;
       width: 550px;
    }

    .navig li li {
       padding: 0 6px;
       background: url(../../../picture/sub_bg.gif) repeat-x;
    }

    .navig li ul {
       background: url(../../../picture/sub_bg.gif) repeat-x;
    }

    .navig li li a {
       color: #000;
       padding: 0.3em;
       font-family: sans-serif, 'Arial';
       font-size: 11px;
       text-transform: none;
    }

    /* fix the colors for selected item and submenu, for better usability */

    .navig li.selected li a, .navig li.selected li a:hover {
       color: #FFF;
       background: url(../../../picture/sub_bg.gif) repeat-x;
    }

    .navig li.selected li, .navig li.selected:hover li a, .navig li.selected ul {
       background: url(../../../picture/sub_bg.gif) repeat-x;
       text-decoration:none;
    }

    .navig li li.selected, .navig li.selected:hover li.selected a, .navig li li.selected a{
      background: url(../../../picture/sub_hover_bg.gif);
    }
    .navig li.selected li a:hover, .navig li.selected:hover li a:hover{
    color: #eee;
    }


    /* IE5/Mac: \*//*/

    .navig {
       display: inline-block;
    }

    .navig a {
       float: left;
    }

    .navig li ul {
       top: 1.8em;
       height: 2em;
    }

    .navig li li, .navig li li a {
       display: inline;
       float: none;
    }

    /*  */
Innerhalb der Hauptnavigation, die z.B. eine Breite von 700px hat, wird dem aktiven Hauptmenüpunkt (HalliHallo-4)
also nochmal eine Breite von 700px zugewiesen. Daher bricht die Navigation natürlich um, da die
Inhaltsbreite nur 760px hat.


width=700px in der Klasse "navig aktiv:
Image

Entferne ich nun "width" in der Klasse "navig", so steht meine Hauptnavigaton zwar schön
nebeneinander, aber dafür stehen dann die aktiven Subnavigationsmenüpunkte untereinander.

width=700px in der Klasse "navig" nicht aktiv:
Image

Ich sitzte da leider schon eine ganze Weile dran und komme echt nicht weiter.


Und noch ein paar Fragen.
Wieso wird die Klasse "navig" eigentlich drei mal ausgegeben?
Woher kommen die beiden Klassen "sub_no" und "sub_ul"? Aus dem RT?


Viele Grüße!
Spielplan