[TYPO3-templavoila] Help needed with creating a main menu
Manfred Palmer
admin at silverpark.net
Sun May 9 07:43:32 CEST 2010
Thanks for the advice Ron, much appreciated. I hope the problem has
nothing to do with this recent bug, though?
http://bugs.typo3.org/view.php?id=14143
At least I found a website which uses a hidden navmenu similar to mine..
http://t3test.xetpoint.com/index.php?id=601
so I guess that means technically it should work, that's a bit of a
relief. :)
Unfortunately there are so many (huge) tutorials on TypoScript, it is
rather difficult to locate the information you need, within a reasonable
time frame anyway.
I find this makes the learning process quite a struggle, especially
considering that the majority of tutorials contain dead links.
How you guys managed to stay patient and stick through this initial
stage of getting your existing content up & running in Typo3 is beyond
me. ;)
(I presume the dead-links-issue is probably caused by a recent overhaul,
or a reorganisation of the online documentation section on typo3.org?).
Best,
-Manfred
Am 03.05.2010 05:52, schrieb Ron Hall:
> Hello Manfred,
>
> I cannot tell if your issue is only the TS for the menu or also the mapping of the object.
>
> For sure the menu code you have written will not generate the output you want. It needs at least a second level on the TMENU. I never write menus using tables but use lists. However, the general idea is the same. Here is code that I have used for a similar menu it should give you something to compare against.
>
> globalMenu = HMENU
> globalMenu.entryLevel = 0
> globalMenu.wrap =<ul id="globalMenu">|</ul><!-- end #globalMenu -->
> globalMenu.1 = TMENU
> globalMenu.1 {
> expAll=1
> noBlur = 1
> NO.stdWrap.htmlSpecialChars = 1
> NO.subst_elementUid = 1
> NO.allWrap=<li id="gmItem-{elementUid}" class="level-1">|
> NO.wrapItemAndSub = |</li>
> NO.ATagParams = class="linkLevel-1"
> NO.stdWrap.case = upper
> }
> globalMenu.2 = TMENU
> globalMenu.2 {
> noBlur = 1
> wrap =<ul>|</ul>
> NO.stdWrap.htmlSpecialChars = 1
> NO.wrapItemAndSub =<li class="level-2">|</li>
> NO.ATagParams = class="linkLevel-2"
> NO.stdWrap.case = upper
> }
>
> Ron
>
>
>
>
>
>
>
> On May 2, 2010, at 8:53 PM, Manfred Palmer wrote:
>
>> 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
>>
>>
>>
>> _______________________________________________
>> TYPO3-project-templavoila mailing list
>> TYPO3-project-templavoila at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-templavoila
>>
>
More information about the TYPO3-project-templavoila
mailing list