[Typo3] tmenu wrap with pid surrounding submenu items

Mr. Friendly typo3 at bizon.de
Mon May 23 18:43:23 CEST 2005


Hi,

i like to build a typical two level horizontal navigation menu. While moving over the top level, the related submenu should appear. Usually i summarize each submenu with a <div> and switch display options (while moving over top level menu) by javascript (e.g. "onMouseOver" with id of the related <div>).

HTML is like that:
<!-- top level -->
<div id="mainnav_3">
  <a title="home" href="index.php?id=3" onfocus="blurLink(this);">
    <img onmouseover="collapseAllMenus(); showMenuInit(true, 'subnav_3', this);" onmouseout="initMenuCollapse('subnav_3');" src="..." alt="home" ... />
  </a>
</div>

<!-- related submenu -->
<div id="subnav_3" onmouseover="showSubMenu(this.id);" onmouseout="initMenuCollapse(this.id);">
  <ul>
    <li><a href="index.php?id=53" onfocus="blurLink(this);">page 1</a></li>
    <li><a href="index.php?id=52" onfocus="blurLink(this);">page 2</a></li>
    <li><a href="index.php?id=51" onfocus="blurLink(this);">page 3</a></li>
  </ul>
</div>

Therefor i use GMENU for generating top level menu graphics and add some "onMouseOver" and "onMouseOut" functionality with "imgParams". Using "elementUid" i set the required javascript parameter for each top level element.

But how to name the <div id="{parentID}"> ?
"elementUid" resp. "elementPid" (which i added in class.tslib_menu.php) only works on "allWrap", so it can be used for <li> but not the surrounding <div>.

Any suggestions?

Thanx
- Steffen (mrfriendly)

-----------------------
The mailing list archive is found here:
http://typo3.org/documentation/mailing-lists/english-main-list-archive/
				



More information about the TYPO3-english mailing list