Menu

News

Monday 20. of November 2006 Speed up PHP5 and Mysql on osx

Friday 01. of September 2006 New version of phpadsnew

Wednesday 26. of July 2006 Me and my macBook

Saturday 03. of June 2006 Advanced pop-up and acronym manager

Site Sponsors

Advertise using Text-Link-Ads

CMS Solutions

System CMS

 

Foro Apple

Foro Apple

 

Cocktails

Cocktails of the World

of the world!

Want to advertise here?

Single page or site-wide advertisements. Gain your PR with back-links from a high ranked site.

Click here to request more information

A CSS based 3 Level Drop Down for Typo 3

Well... it's mostly CSS based when it comes to positioning of the elements. Ofcourse there is a little bit of JS needed to make the magic happen. I decided to use JS for both MS and Mozilla based browsers for the simple fact that I can keep the CSS the same between both browsers. It's only tested on FF 1.5 and IE 6 let me know if you works for you. I created this version so you all know how to make a thing like this in TYPO3.

Btw... YACBDDM stands for Yet Another CSS based drop down menu (for TYPO3)

A general structure for such a menu is like this: (taken from Opens external link in new windowhttp://www.alistapart.com/)

  <ul> 
<li><a href="#">Home</a></li>
<li><a href="#">About</a>
<ul>
<li><a href="#">History</a></li>
<li><a href="#">Team</a></li>
<li><a href="#">Offices</a></li>
</ul>
</li>
<li><a href="#">Contact Us</a>
<ul>
<li><a href="#">United Kingdom</a></li>
<li><a href="#">France</a></li>
<li><a href="#">USA</a></li>
<li><a href="#">Australia</a></li>
</ul>
</li>
</ul>

The Typoscript for a menu like the above is straight forware. Simple un-ordered lists into each other. Make sure that the UL tag comes directly after the tag and not in it's own list element.

 First level, this is basis the horizontal part of the menu
yacbddm = COA
yacbddm.10 = HMENU
yacbddm.10.1 = TMENU
yacbddm.10.1 {
    noBlur = 1
    expAll = 1
    wrap = <ul id="yacbddm" class="topmenul1"> | </ul>
    NO.wrapItemAndSub = <li> | </li>
    NO.ATagParams = class="firstlevellink"
    IFSUB=1
    IFSUB {
        wrapItemAndSub = <li> | </li>
        ATagParams = class="firstlevellink topmenul1-ifsub"
    }
}

# First dropdown Menu configuration
yacbddm.10.2 = TMENU
yacbddm.10.2 {
    noBlur = 1
    expAll = 1
    wrap = <ul class="topmenul2"> | </ul>
    NO.wrapItemAndSub = <li> | </li>
    IFSUB=1
    IFSUB {
        wrapItemAndSub = <li> | </li>
        ATagParams = class="topmenul2-ifsub"
    }
}
# Second dropdown is the same is first drop down
yacbddm.10.3 < yacbddm.10.2
yacbddm.10.3.wrap = <ul class="topmenul3"> | </ul>

# Third dropdown is the same is first drop down
yacbddm.10.4 < yacbddm.10.2
yacbddm.10.4.wrap = <ul class="topmenul4"> | </ul>

yacbddm.20 = TEXT
yacbddm.20.value (
   <script src="fileadmin/templates/scripts/yacbddm.js" type="text/javascript"></script>
   <script type="text/javascript">/*activateMenu('yacbddm')*/</script>
)

Documentation for Initiates file downloadCSS and Initiates file downloadjavascript (both downloadeable wil follow).

Will finnish this tomorrow