menu system

Menu system, a forum discussion on Jojo CMS. Join us for more discussions on Menu system on our General Discussion forum.

Back to Forum Index : Back to General Discussion   RSS
justsearch

2 Aug 2007
Posts: 12

Hi all, managed to get the installation sorted but when i add child pages through the admin system they don't appear in the live menu, i've tried changing the template but that doesn't work. If i create a main page it appears, but if i try 2nd nav or footer nav it doesn't do anything, any help would be appreciated.

Cheers
Neil Walker
Harvey

Core Developer

Harvey

3 Aug 2007
Posts: 327

Hi Neil,

There are 2 ways to do menus in Jojo. One is easy to use but a bit inefficient, and the other is fast, but more complicated.

The menu found in the template is the second one. This is controlled using themes/yourtheme/global.php and some Smarty code in the template.tpl file.

It's fairly well commented, so see if you can work through what it does and make whatever tweaks you need.

If this looks a bit scary, then the other way is simpler. To enable the simple nav, first add the attached TemplateOptions.php into your theme folder. This enabled the simple menu. Then, in your template insert {$menu} where you want the menu to appear.

You will then need to create some CSS to control the styling of the menu - it's a standard multi-level bullet list with class="selected" on the selected element. We aalways write our own CSS for menus, but there are plenty of examples online on how to style unordered lists for main navigation.

We expect to have a slightly nicer method of controlling navigation in future releases, most likely a way of choosing from 5-10 premade navigation structures without having to get involved in the PHP code.

Harvey.

Attached Files

justsearch

7 Aug 2007
Posts: 12

Hi Harvey;

Thanks for the reply, tried it but to no success, what I am trying to achieve is the same drop down CSS menu which is present on the Demo site, I looked at the source code when I added sub pages to the menu and it displays like:
---------------------------------------
<div id="menu">
<div id="menu-inner">
<ul id="nav">
<li class="first selected"><a href="http://demo.jojocms.org/" title="Jojo CMS Demo">Home</a></li>
<li><a class="daddy" href="about/" title="About this Demo site">About</a>
<ul>

<li class="first"><a href="test/" title="test">test</a></li>
<li class="last"><a href="test2/" title="test 2">test 2</a></li>
</ul>
</li>
<li><a href="articles/" title="Articles">Articles</a></li>
<li><a href="faq/" title="FAQ">FAQ</a></li>
<li><a href="links/" title="Links">Links</a></li>

<li><a href="testimonials/" title="Testimonials">Testimonials</a></li>
<li class="last"><a href="contact/" title="Contact">Contact</a></li>
</ul>

<div class="clear"></div>
</div><!-- [end menu] -->
</div>
-------------------------------------------------

As oppose to the standard source code which when rendered shows:

-------------------------------------------------
<div id="menu">

<ul>
<li id="current"><a href="http://www.theinternetgroup.com.justsearch.webhoster.co.uk"
title="Home">Home</a></li>
<li ><a href="sitemap/"
title="A simple listing of all pages on this website">Sitemap</a></li>
<li ><a href="performance/"
title="performance">performance</a></li>
<li ><a href="contact/"
title="Contact">Contact</a></li>
<li ><a href="articles/"
title="Articles">Articles</a></li>

</ul>
</div>
-------------------------------------------------
Do I need to code this myself? if so any help would be much appriciated, I did try looking for they styles of: Menu-inner / nav and class daddy, I have attached an image of the simple menu set up on the test site,

Any help would be grateful;

Cheers

Neil Walker
Neil Walker
Harvey

Core Developer

Harvey

7 Aug 2007
Posts: 327

Hi Neil,

Could you please zip and attach your theme, I'll have a look and send back with the menu working (and instructions on what I did to get it working).

Harvey.
justsearch

8 Aug 2007
Posts: 12

Hi Harvey;

Thanks for this; I'll write a couple of articles on some of my blogs to spread the Jojo name. I was trying to use the dynamic drop down menu with the existing themes which came with the Jojo install originally but to no avail.

So what I have done is taken the design I am going to be using and implemented it as a Jojo template, (Please find the files attached).

Everything is working fine apart from the Dynamic drop down, if you have any look it would be appreciated or any comments,

(P.s. Ignore the folder called Original)

Many Thanks

Neil Walker
Neil Walker
justsearch

8 Aug 2007
Posts: 12

The file is attached below (Didn't work last time)

Attached Files

Neil Walker
Harvey

Core Developer

Harvey

8 Aug 2007
Posts: 327

Hi Neil,

Updated theme attached. I have included the menu.css form the Jojo site, I'll leave it to you to tweak the CSS how you like, but this should be a good starting point.

Harvey.

Attached Files

justsearch

8 Aug 2007
Posts: 12

Hi Harvey, works perfectly, really appreciate that you have done that, when I've got the site complete I'll add it to the "Your Jojo site" for review, one last question (I thinks) how do I turn of the message "Debug Mode currently Enabled"?

Once again many thanks for the help,

Cheers
Neil Walker
Harvey

Core Developer

Harvey

8 Aug 2007
Posts: 327

Debug mode is set in config.php

Just set it to false, and you will find it runs much nicer.

In the Alpha2 version turning off debug mode also hides PHP errors, which is good security wise, but can be an inconvenience when something goes wrong.

In the latest dev version, there is an additional option for turning PHP errors on/off which doesn't involve hacking the config file - this will be available in the Alpha3 release, due out in the next week or so.

Harvey.
justsearch

8 Aug 2007
Posts: 12

cheers Harvey
Neil Walker
JamesMcFall

16 Aug 2008
Posts: 6

Hi guys,
I'm just building a site at the moment that needs a drop down menu system. I'm running Jojo RC1, and the method described here doesn't work.

Is there another way to do this nowdays?

Cheers
lynchpin

17 Aug 2008
Posts: 60

see this post from a couple weeks ago.
Dropdown menu
Back to Forum Index : Back to General Discussion   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.