Page 1 of 1

drop down menu

Posted: Sun 23. Feb 2014, 15:35
by Batista
hi there,

so after a while, I'm back again with phpwcms.

one question, I need a horizontal dropdown menu, found this http://forum.phpwcms.org/viewtopic.php?t=16080 is it still on going or, is there an easier way?

thanks.

Re: drop down menu

Posted: Sun 23. Feb 2014, 18:30
by Old Boy
Use it... works like charm :!:

Only 2 files to copy and paste to your webspace and 1 Replacement-Tag to copy into your main-template... that's all!

I don't know anything, that is easier!

Re: drop down menu

Posted: Sun 23. Feb 2014, 19:23
by Oliver Georgi
Stop using this, search the web for one of the modern CSS based in co-work with {NAV_LIST_UL:…). If you want fast success and a nice modern solution — download the older Twitter Bootstrap http://getbootstrap.com/2.3.2/ and start with this replacer

Code: Select all

{NAV_LIST_UL:PB,0,,active|nav,active}
It can look like this http://www.spendenstein.de

But the web is full of good CSS UL/LI solutions…

Re: drop down menu

Posted: Mon 24. Feb 2014, 08:15
by update
What kind of output would the parameter B produce, if in use?

Re: drop down menu

Posted: Mon 24. Feb 2014, 09:08
by juergen
front.func.inc

in der Definition der NAV_LIST_UL Funktion :

Code: Select all

	case 'PBA':		$bootstrap		= true;
...



	if($bootstrap) {
					$li_class	= trim('dropdown '.$li_class);
					$bs_toggle	= true;

Meiner Interpretation nach wird als 13. Parameter nur ein 'dropdown' vor die CSS- li- Klasse gehängt.

Re: drop down menu

Posted: Mon 24. Feb 2014, 10:26
by Oliver Georgi
It prepares for Bootstrap compatible rendering. And enables the (Bootstrap) Dropdown toggle element. But NAV_LIST_UL can be customized with a lot more options.

See the parameter options:

Code: Select all

@string $parameter:
	menu_type,
	start_id,
	max_level_depth,
	class_path|ul_class_level1|ul_class_level2|...,
	class_active_li|class_active_a,
	ul_id_name,
	wrap_ul_div(0 = off, 1 = <div>, 2 = <div id="">, 3 = <div class="navLevel-0">),
	wrap_link_text(<em>|</em>, articlemenu_start_level)
What the different single chars stand for:

Code: Select all

P = Show parent level
B = Bootstrap compatible rendering
A = Articles as menu items
F = Folded, unfold only active level
HCSS = Sample horizontal CSS based menu
VCSS = Sample vertical CSS based menu

Re: drop down menu

Posted: Mon 24. Feb 2014, 11:58
by update
hab das B mal im wiki ergänzt ;)

Re: drop down menu

Posted: Mon 24. Feb 2014, 13:14
by Oliver Georgi
daran denken, Folded F gibt es nicht in Kombi mit B.

Re: drop down menu

Posted: Mon 24. Feb 2014, 13:37
by update
hab's ergänzt ;)

Re: drop down menu

Posted: Tue 25. Feb 2014, 11:02
by Old Boy
Oliver Georgi wrote:...
If you want fast success and a nice modern solution — download the older Twitter Bootstrap http://getbootstrap.com/2.3.2/ and start with this replacer

Code: Select all

{NAV_LIST_UL:PB,0,,active|nav,active}
Please Oliver, what is the reason, you recommend the elder bootstrap 2.3.2 version and not the newest 3.1.1 or the "nightly", although its not supported anymore ???

Re: drop down menu

Posted: Tue 25. Feb 2014, 11:09
by Oliver Georgi
Dropdown yet not tested against Boostrap 3.x, that is all. It might work — I do not know. But try yourself and report to me.

Re: drop down menu

Posted: Tue 25. Feb 2014, 11:18
by Old Boy
I have testet it yesterday, after reading this thread... i thought: "Give it a try, seems to be easy, because of the good instructions and example-scripts!"

After a few hours of juggling with the code, i had build my very first site with phpwcms and the newest bootstrap revision 3.1.1!

And it works (nearly) out of the box :D
Very first steps, but all works fine... incl. the drop down menu.

The following RT does the trick :)

Code: Select all

{NAV_LIST_UL:B,0,,active|nav navbar-nav,active}

Re: drop down menu

Posted: Tue 25. Feb 2014, 11:57
by Oliver Georgi
Yepp, makes sense because Bootstrap wants to have navbar classes too — I tweak my Bootstrap CSS always and kick everything I do not need out of my Less files.