Page 1 of 1

Add javascript Menu

Posted: Mon Jul 28, 2008 3:46 pm
by abhijit.m
Hi friends,
        This is Abhijit.
My Question is regarding a vertical menu positioned in right side of the template. Now I have to create the submenus which will fly left. Pls tell me the procedure to create the submenus which fly left, and what is the procedure to add a Javascript to a Template.
Thanks
Abhijit

Re: Add javascript Menu

Posted: Mon Jul 28, 2008 4:07 pm
by kermit
the sample content you can add when you install cmsms has an example menu like what you're trying to do. look at the template "CSSMenu left + 1 column" and it's menu template (the file-based template, "cssmenu.tpl"). you may find it easier to base your menu on that sample.

as you add pages, in particular, child pages and nested parent pages (and their children), you are creating the hierarchy of what will become your menu. the default menu templates output a single nested, unordered list, automatically based upon your site hierarchy. submenus in a 'flyout' or 'dropdown' menu would be the 2nd level (or deeper) lists and would be made up of pages which have child pages underneath them in the hierarchy... the structure of the list looks something like this:

Code: Select all

<ul>
<li>Root Item 1 (position 1)</li>
<li>Root Item 2 Submenu Parent (position 2)
    <ul>
    <li>Child (submenu) Item (position 2.1)</li>
    <li>Child (submenu) Item (position 2.2)</li>
    <li>Child (submenu) Item (position 2.3) 3rd level parent
        <ul>
        <li>3rd level child (position 2.3.1)</li>
        <li>3rd level child (position 2.3.2)</li>
        </ul></li>
    <li>Child (submenu) Item (position 2.4)</li>
    </ul></li>
<li>Root Item 3 (position 3)</li>
</ul>

to add javascript to a template, the easiest is to use an external file, upload it to your web space and link to it in the of your template or in the 'global metadata'. if you include actual javascript code anywhere (that's not an external file) be sure to put it inside a smarty {literal} block to keep the template engine from trying to interpret it (the {curly braces} found in javascript and css are special characters to smarty).

Re: Add javascript Menu

Posted: Wed Aug 06, 2008 9:34 am
by bterkuile
You can also give a shot at the bMenu module. This module has settings to control the direction of the submenus (left,right, top, bottom)