Top menu below header

Get help with installation and running PivotX 2.0.x here. Please do not post Extension or Theme related questions here.

Top menu below header

Postby Willem » Sat Apr 19, 2008 2:51 pm

Hi,
thanks for the excellent update for Pivot. PivotX realy takes the CMS to a next level. I am using Pivot already since a long time on Maconniek.nl. So I also decided to use is as CMS for the website I make for a Linux distro (pardus-linux.nl).
I was wondering what would be the easiest way to make a top menu structure, pointing to pages maintained by pivot?

I am making a dutch Pivot driven counterpart to http://www.pardus.org.tr/eng/index.html . So I am trying to make a template which resembles as close as possible.
User avatar
Willem
 
Posts: 7
Joined: Sat Apr 19, 2008 2:34 pm

Re: Top menu below header

Postby Bob » Sun Apr 20, 2008 8:42 am

A menu like that is pretty simple to make. Use something like this:

Code: Select all
[[ pagelist
  chapterbegin="<div class='menu'>"
  pages="<a href='%link%' title='%subtitle%'>%title%</a> "
  chapterend="</div>"
  isactive="class='activepage'"
]]
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: Top menu below header

Postby seb » Fri Jan 30, 2009 9:13 am

Can we then also integrate a final column for links that are not generated automatically by pivotx?
seb
 
Posts: 77
Joined: Wed Jan 16, 2008 12:34 pm

Re: Top menu below header

Postby hansfn » Fri Jan 30, 2009 1:35 pm

Just make chapterend an empty string and add whatever you want after the pagelist tag, and the close the whole thing with whatever was in chapterend.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Top menu below header

Postby seb » Sun Feb 01, 2009 8:34 am

I also would like to see a full menu which shows only the chapters in the menu-bar and will show the pages of every chapter, when mousing on it!?

Or am I then a little for forward thinking? :oops:
seb
 
Posts: 77
Joined: Wed Jan 16, 2008 12:34 pm

Re: Top menu below header

Postby hansfn » Sun Feb 01, 2009 4:14 pm

That is easy. Basically, create a nested list
Code: Select all
<ul>
[[ pagelist
  chapterbegin="<li>%chaptername%<ul>"
  pages="<li><a href='%link%' title='%subtitle%'>%title%</a></li>"
  chapterend="</ul></li>"
]]
</ul>

and then add the needed CSS/Javascript to turn it into an expanding menu. (You can do it completely without JS - if that matters too you.)
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Top menu below header

Postby seb » Sun Feb 01, 2009 5:04 pm

Any tips on some examples?! I am not the typ programmer that fix that without some good example!
seb
 
Posts: 77
Joined: Wed Jan 16, 2008 12:34 pm

Re: Top menu below header

Postby hansfn » Sun Feb 01, 2009 7:28 pm

Look at the source code of for example http://www.cssplay.co.uk/menus/final_drop.html (which requires some extra HTML code in chapterbegin/end) or google for other techniques. I don't have time to write out the example completely, sorry.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Top menu below header

Postby seb » Tue Feb 03, 2009 10:01 am

I succeeded at create a automatic menu. In the end I used this script from dynamic drive: http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/

When my site is moved to its final location I can show off...
seb
 
Posts: 77
Joined: Wed Jan 16, 2008 12:34 pm

Re: Top menu below header

Postby seb » Thu Mar 05, 2009 11:11 pm

If I want to create a submenu that displays only the subpages of a current active chapter, what does the code look like?

Code: Select all
[[ pagelist
onlychapter="%chaptername%"
chapterbegin=" "
pages="<a href='%link%' title='%subtitle%'>%title%</a>"
chapterend=" "
]]


So the onlychapter should get the value of the current chapter, is that to be done?!
Last edited by seb on Tue Mar 10, 2009 8:24 pm, edited 1 time in total.
seb
 
Posts: 77
Joined: Wed Jan 16, 2008 12:34 pm

Next

Return to 2.x Support Forum

Who is online

Users browsing this forum: No registered users and 3 guests

cron