[TYPO3] [fixed] Re: How to integrate adxmenu (used in mediatech) in templavoila?

stinky wizzleteet wizzleteet at hotmail.com
Mon Mar 13 19:17:36 CET 2006


Ah !

the time has arrived where I start answering my own questions !
One needs to:
1 edit the html template to include the CSS files in the header
2 map the content, topnav, menu and submenu to the corresponding div's 
in the template.
3 edit the TSconfig
*4* reference the tsconfig sections in the xml of the template.


1:
<head>

   <link type="text/css" href="css/Menu.css" rel="stylesheet" 
media="screen, tv, projection" />

   <link type="text/css" href="css/style.css" rel="stylesheet" 
media="screen, tv, projection" />

<!--[if lte IE 6]> <style type="text/css" media="screen, tv, 
projection"> @import "css/Menu4IE.css"; body { 
behavior:url("css/ADxMenu.htc"); } </style> <![endif]-->
</head>

(NB: somehow <style> @import etc doesn't work with templavoila, it shows 
the preview of the template correctly, but the mapping is without css...)

2. declare an extra field calle "field_nav" and map it to the topnav div.

3.In my TSconfig I have :

tsconfig:

### from FTB:
lib.mainMenu = HMENU
##^-- look this is different from FTB
   # First level menu-object, textual

lib.mainMenu.1 = TMENU
##^-- look this is different from FTB

lib.mainMenu.1 {
##^-- look this is different from FTB

     # Normal state properties

   NO.allWrap = <div class="vertnav1"> | </div>
                        ##^-- look this is different from FTB

   NO.stdWrap.htmlSpecialChars = 1

     # Enable active state and set properties:

   ACT = 1

   ACT.stdWrap.htmlSpecialChars = 1

   ACT.allWrap = <div class="vertnav1-act"> | </div>
                   ##^-- look this is different from FTB

}

   # Second level menu-object, textual

lib.mainMenu.2 = TMENU
##^-- look this is different from FTB

lib.mainMenu.2 {

     # Normal state properties

   NO.allWrap = <div class="vertnav2"> | </div>

   NO.stdWrap.htmlSpecialChars = 1

     # Enable active state and set properties:

   ACT = 1

   ACT.stdWrap.htmlSpecialChars = 1

   ACT.allWrap = <div class="vertnav2-act"> | </div>

}

#topnav menu ripped from the mediatech TSCONFIG setup:
subparts.TOPNAV = HMENU
subparts.TOPNAV.special = directory
#subparts.TOPNAV.special = list
subparts.TOPNAV.special.value = 60
#subparts.TOPNAV.excludeUidList = 1,2,3
subparts.TOPNAV {
wrap = <div id="menu"> | </div>
entryLevel = 0
1 = TMENU
1 {
expAll=1
noBlur = 1
wrap = <ul id="menuList" class="adxm"> | </ul>
NO {
wrapItemAndSub = <li> | </li>
}
}
2 = TMENU
2 {
expAll=1
noBlur = 1
wrap = <ul class="subList"> | </ul>
NO {
wrapItemAndSub = <li class="submenu"> | </li>
}
}
3 = TMENU
3 {
expAll=1
noBlur = 1
wrap = <ul class="subList"> | </ul>
NO {
wrapItemAndSub = <li class="submenu"> | </li>
}
}
4 = TMENU
4 {
expAll=1
noBlur = 1
wrap = <ul class="subList"> | </ul>
NO {
wrapItemAndSub = <li class="submenu"> | </li>
}
}
}


page = PAGE
page.typeNum = 0

page.10 = USER
page.10.userFunc = tx_templavoila_pi1->main_page

4 . In the DO xml (list -> STorage Folder -> right click on DO -> edit) 
I put:


<field_topnav type="array">
                 <tx_templavoila type="array">
                     <title>topnav menu</title>
                     <description>Pick the HTML container element where 
you want the automatically made topNAV items to be placed.</description>
                     <sample_data type="array">
                         <numIndex index="0">[topnav Menu goes 
here]</numIndex>
                     </sample_data>
                     <eType>TypoScriptObject</eType>
                     <tags>table:inner,ul,div,tr,td</tags>
                     <eType_EXTRA type="array">
                         <objPath>subparts.TOPNAV</objPath>

                    </eType_EXTRA>
                     <TypoScriptObjPath>subparts.TOPNAV</TypoScriptObjPath>
                 </tx_templavoila>
             </field_topnav>
  -------------------
notice the <objPath>subparts.TOPNAV</objPath>
this is the topnav menu mentioned in the tsconfig

As for the main menu:
When one maps a menu item the xml automatically calls it "lib.mainMenu"
I followed the Futuristic Template Building  howto (actually, the 
tsconfig code is from there), but instead of editing the xml I edited 
the tsconfig.
I also edited the <div class= reference to point to mediatech's css 
instead of the FTB css.

Voila !



stinky wizzleteet wrote:
> Hi,
> 
> I installed templavoila, and now the menu in mediatech's templates don't 
> work.
> I wonder how does one integrate it in templavoila.
> Do I need to insert (a segment) of the mediatech typoscript in the xml 
> of the DS or TO ?
> Or do I need to edit the typoscript in TSconfig and how ?
> 
> 
> Help appreciated.
> 
> wzzl



More information about the TYPO3-english mailing list