[TYPO3] Accessible menu with templavoila
Robert Flach, Web Developer
robert.flach at webtooldeveloper.com
Fri Aug 31 00:06:25 CEST 2007
Hi,
I'm Robert Flach.
I'm trying to create a standard unordered list type menu with typo3
and templavoila and I'm running into a little difficulty. I'm hoping
someone can help.
I created the following typoscript on my main template using the
instructions here: http://wiki.typo3.org/index.php/Accessible_menu
## Menu [Begin]
lib.mainMenu = COA
lib.mainMenu {
10= HMENU
10.entryLevel = 0
10.1 = TMENU
10.1 {
noBlur = 1
CUR = 1
ACTIFSUB = 1
}
10.1.NO {
wrapItemAndSub = <li>|</li>
ATagParams =
}
10.1.CUR {
wrapItemAndSub = <li class="first">|</li>
doNotLinkIt = 1
}
10.1.ACTIFSUB {
wrapItemAndSub = <li class="first">|</li>
}
10.2 = TMENU
10.2 {
noBlur = 1
CUR = 1
ACTIFSUB = 1
}
10.2.NO {
wrapItemAndSub = <li>|</li>
ATagParams =
}
10.2.CUR {
wrapItemAndSub = <li class="first">|</li>
doNotLinkIt = 1
}
10.2.ACTIFSUB {
wrapItemAndSub = <li class="first">|</li>
}
10.2.wrap = <ul>|</ul>
}
## Menu [End]
config.spamProtectEmailAddresses = 1
page = PAGE
page.typeNum = 0
page.10 = USER
page.10.userFunc = tx_templavoila_pi1->main_page
The only deviation I made was to leave off the 10.1.wrap = <ul>|</ul>
because I had already created the main menu as an Internal mapping on
it's containing <UL>.
The relevant section of my DS for the templavoila template for the site is:
<field_menu type="array">
<tx_templavoila type="array">
<title>Main menu</title>
<description>Pick the HTML container element where
you want the automatically made menu items to be placed.</description>
<sample_data type="array">
<numIndex index="0">[Menu goes here]</numIndex>
</sample_data>
<eType>TypoScriptObject</eType>
<tags>table:inner,ul,div,tr,td</tags>
<TypoScriptObjPath>lib.mainMenu</TypoScriptObjPath>
</tx_templavoila>
</field_menu>
I have multiple published public pages with submenu items, I have
cleared all cache. But what appears on the generated page is this:
<li><a href="index.php?id=117" >Home</a></li><li><a href="index.php?id=119" >Ministries</a></li><li><a href="index.php?id=102" >Visions</a></li><li><a href="index.php?id=101" >About Us</a></li><li><a href="index.php?id=98" >Contact</a></li>
You can see my visible site at new.nlbf.org.
Thank you so much to anyone who can take the time to help me out.
Thanks,
Robert Flach
More information about the TYPO3-english
mailing list