Add javascript Menu

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
abhijit.m

Add javascript Menu

Post 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
Last edited by abhijit.m on Mon Jul 28, 2008 3:48 pm, edited 1 time in total.
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Add javascript Menu

Post 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).
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
bterkuile
Forum Members
Forum Members
Posts: 97
Joined: Sun Jul 22, 2007 11:48 am

Re: Add javascript Menu

Post 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)
Locked

Return to “Layout and Design (CSS & HTML)”