[TYPO3] Setting different ids in menu enclosing divs
Christopher Torgalson
bedlamhotel at gmail.com
Thu Dec 21 05:12:38 CET 2006
Hello,
On 12/20/06, Eduardo Trápani <eduardo at esperanto.org.uy> wrote:
> > Set it on the menu item and not the menu - the NO not the tmenu itself
>
> Thanks Tyler, that does it for the menu(I'm getting closer and
> understanding a lot), but not for the enclosing div.
>
> The (simplified) html template has:
>
> <ul>
> <li>Menu 1</li>
> <div id="menu_1">
> <li>Menu 1.1</li>
> <li>Menu 1.2</li>
> </div>
>
> <li>Menu 2</li>
> <div id="menu_2">
> <li>Menu 2.1</li>
> </div>
> </ul>
You know that this HTML is completely wrong, right?
> All I want is to be able to create those div with an unique id (the
> designer wrote menu_1, but it could be anything), one that will be
> passed to onclick with ATagParams.
If a designer sent me anything with HTML like that in it, I'd send it back :-)
> I read about all properties, about calling functions
> (parentObj->id),{$parentObj.id},{page:id} but I never get the parent, or
> any other id in the div!
>
> temp.menu_1.2 = TMENU
>
> temp.menu_1.2 {
>
> subst_elementUid = 1
>
> wrap = <div id="menu_{elementUid}" class="divSubMenu"> | </div>
> NO.allWrap = <li class="liSubMenu"> | </li>
> }
"subst_elementUid = 1" makes no sense in this context--as Tyler
pointed out, that property belongs to menu ITEMS, not menus.
What does your menu system need to DO? If it's just a more-or-less
standard javascript-driven flyout menu or similar, you can probably
adapt one of the many freebies on the web--for example, somebody has
very helpfully Typoscript-ized the Brainjar menus [1], [2]. The
Brainjar menus' HTML is not all it might be, but it's better than the
invalid markup you're proposing to use.
--
Christopher Torgalson
[1] http://www.brainjar.com/dhtml/menubar/
[2] http://typo3.umloud.dk/index.php?id=356
More information about the TYPO3-english
mailing list