[TYPO3-templavoila] Help needed with creating a main menu
Manfred Palmer
admin at silverpark.net
Mon May 3 03:53:01 CEST 2010
Hi everyone,
I am having a few difficulties setting up a main menu in TemplaVoilà.
I am using the latest versions of Typo3 (4.3.2) and Templavoilà (1.4.2).
So far, I have completed the mapping process and TV successfully
detected the main menu inside my existing HTML code.
It went ahead and wrapped some nice & shiny typoscript code around it,
but I don't think that code is quite correct. *sobs*
I'll provide screenshots to show how it "should" look like and what it
"did" look like, that'll probably make things easier.
Here's the original main menu, before I tried to add it to Typo3:
http://www.silverpark.net/pub_img/m02/snapshot_working_menu.jpg
Note: There are obviously two menus on that screenshot, I am referring
to the drop-down main menu at the top. In that screenshot, I opened one
of its hidden sub-menus. Those are supposed to be hidden, until a user
hovers their mouse over one of the links. TV detected that just fine,
except it only "grabbed" a little part of the menu's code in the end.
My original HTML code can be reviewed here:
http://www.silverpark.net/pub_img/m02/main-menu-html-code.txt
(In case your browser has trouble displaying .txt files, you can also
use this word document instead:
http://www.silverpark.net/pub_img/m02/main-menu-html-code.doc )
For reference, here are the wrapping-settings I used:
http://www.silverpark.net/pub_img/m02/snapshot_mapping_overview.jpg
And below is what TemplaVoilà did to my code:
******** BEGIN TEMPLA VOILA`S CODE: ********
## Menu [Begin]
lib.mainMenu = HMENU
lib.mainMenu.entryLevel = 0
lib.mainMenu.wrap = <tr>|</tr>
lib.mainMenu.1 = TMENU
lib.mainMenu.1.NO {
allWrap = <td class="head-row2-col3" nowrap align="left"><span id="m2"
onMouseOver="show(this,ms2)">|</span><span id="ms2"
onMouseOver="onMenu()" onMouseOut="outMenu()"><a class="topmenu-Link"
href="fileadmin/templates/sp-index/construct.html">Mailing
List</a><br></span></td>
}
lib.mainMenu.1.ACT = 1
lib.mainMenu.1.ACT {
allWrap = <td class="head-row2-col2" nowrap align="left"><span id="m1"
onMouseOver="show(this,ms1)">|</span> <span id="ms1"
onMouseOver="onMenu()" onMouseOut="outMenu()"> <a class="topmenu-Link"
href="fileadmin/templates/sp-index/construct.html">News</a><br><a
class="topmenu-Link"
href="fileadmin/templates/sp-index/construct.html">Search
Archives</a><br></span></td>
}
## Menu [End]
config.spamProtectEmailAddresses = 1
page = PAGE
page.typeNum = 0
page.10 = USER
page.10.userFunc = tx_templavoila_pi1->main_page
******** END TEMPLA VOILA`S CODE: ********
..Comparing that result to my original code, where I had wrapped the
entire main menu's <TR>-tag, only two single columns "survived" the
wrapping process. Not even the first columns, but the 2nd and 3rd column
(out of 8 in total), that's really puzzling me.
I removed some of the hidden menu's links from the above quoted code to
make this easier to read, but that's basically the entire code
Templavoilà put in the resulting main template.
As you can imagine, the result isn't very pretty:
http://www.silverpark.net/pub_img/m02/snapshot_bad_results.jpg
What do I probably need to add (or remove), in order to make the main
menu work correctly?
Respectfully submitted,
Manfred Palmer
More information about the TYPO3-project-templavoila
mailing list