drop down menu

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Batista
Posts: 26
Joined: Wed 16. May 2012, 11:12

drop down menu

Post by Batista » Sun 23. Feb 2014, 15:35

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.

Old Boy
Posts: 1120
Joined: Fri 23. Nov 2012, 13:52

Re: drop down menu

Post by Old Boy » Sun 23. Feb 2014, 18:30

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!

User avatar
Oliver Georgi
Site Admin
Posts: 9576
Joined: Fri 3. Oct 2003, 22:22
Location: Moscow, Russia
Contact:

Re: drop down menu

Post by Oliver Georgi » Sun 23. Feb 2014, 19:23

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

User avatar
update
Moderator
Posts: 6394
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: drop down menu

Post by update » Mon 24. Feb 2014, 08:15

What kind of output would the parameter B produce, if in use?
It's mostly all about webdesign, logo design, new and old pages refresh, print BUT slowly switching to be supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.

User avatar
juergen
Moderator
Posts: 4553
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: drop down menu

Post by juergen » Mon 24. Feb 2014, 09:08

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.

User avatar
Oliver Georgi
Site Admin
Posts: 9576
Joined: Fri 3. Oct 2003, 22:22
Location: Moscow, Russia
Contact:

Re: drop down menu

Post by Oliver Georgi » Mon 24. Feb 2014, 10:26

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

User avatar
update
Moderator
Posts: 6394
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: drop down menu

Post by update » Mon 24. Feb 2014, 11:58

hab das B mal im wiki ergänzt ;)
It's mostly all about webdesign, logo design, new and old pages refresh, print BUT slowly switching to be supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.

User avatar
Oliver Georgi
Site Admin
Posts: 9576
Joined: Fri 3. Oct 2003, 22:22
Location: Moscow, Russia
Contact:

Re: drop down menu

Post by Oliver Georgi » Mon 24. Feb 2014, 13:14

daran denken, Folded F gibt es nicht in Kombi mit B.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон

User avatar
update
Moderator
Posts: 6394
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: drop down menu

Post by update » Mon 24. Feb 2014, 13:37

hab's ergänzt ;)
It's mostly all about webdesign, logo design, new and old pages refresh, print BUT slowly switching to be supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.

Old Boy
Posts: 1120
Joined: Fri 23. Nov 2012, 13:52

Re: drop down menu

Post by Old Boy » Tue 25. Feb 2014, 11:02

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 ???

User avatar
Oliver Georgi
Site Admin
Posts: 9576
Joined: Fri 3. Oct 2003, 22:22
Location: Moscow, Russia
Contact:

Re: drop down menu

Post by Oliver Georgi » Tue 25. Feb 2014, 11:09

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

Old Boy
Posts: 1120
Joined: Fri 23. Nov 2012, 13:52

Re: drop down menu

Post by Old Boy » Tue 25. Feb 2014, 11:18

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}

User avatar
Oliver Georgi
Site Admin
Posts: 9576
Joined: Fri 3. Oct 2003, 22:22
Location: Moscow, Russia
Contact:

Re: drop down menu

Post by Oliver Georgi » Tue 25. Feb 2014, 11:57

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

Post Reply