[Typo3] help TSRef example : Creating hierarchical menus of custom links

cdecrozant | AMP cdecrozant at audio-media-productions.com
Tue Nov 29 11:45:56 CET 2005


Hi,
 
I'm trying to understand  "Example: Creating hierarchical menus of
custom links"
in the TSRef.
 
But it doesn't work.
 
Please help me.
 
Thanks
 
What's wrong with this :
 
plugin.tx_automaketemplate_pi1  {
  content = FILE
  content.file  = fileadmin/examples/multimenu_autoparser2-leftdyn.htm
  # Prefix all relative paths with this value:
  relPathPrefix =
  # Markers
  elements  {
    BODY.all  = 1
    BODY.all.subpartMarker  = DOCUMENT_BODY
    HEAD.all  = 1
    HEAD.all.subpartMarker  = DOCUMENT_HEADER
    HEAD.rmTagSections  = title
    TD.all  = 1
    TR.all  = 1
    DIV.all = 1
    SPAN.all  = 1
  }
}
# ************************
# MENU LEFT
# ************************
 
includeLibs.user_3dsplm_pi2 = fileadmin/user_3dsplm_pi2.php
 
lib.leftmenu.20 = HMENU
lib.leftmenu.20.special = userfunction
lib.leftmenu.20.special.userFunc = user_3dsplm_pi2->makeMenuArray
 
lib.leftmenu.20.1 = GMENU
lib.leftmenu.20.1.NO {
  wrap = <tr><td>|</td></tr><tr><td class="bckgdgrey1"
height="1"></td></tr>
  XY = 163,19
  backColor = white
  10 = TEXT
  10.text.field = title
  10.text.case = upper
  10.fontColor = red
  10.fontFile = fileadmin/fonts/ARIALNB.TTF
  10.niceText = 1
  10.offset = 14,12
  10.fontSize = 10
}
 
lib.leftmenu.20.2 = GMENU
lib.leftmenu.20.2.wrap = | <tr><td class="bckgdwhite"
height="4"></td></tr><tr><td class="bckgdgrey1" height="1"></td></tr>
lib.leftmenu.20.2.NO {
  wrap = <tr><td class="bckgdwhite"
height="4"></td></tr><tr><td>|</td></tr>
  XY = 163,16
  backColor = white
  10 = TEXT
  10.text.field = title
  10.text.case = upper
  10.fontColor = #666666
  10.fontFile = fileadmin/fonts/ARIALNB.TTF
  10.niceText = 1
  10.offset = 14,12
  10.fontSize = 11
}
 
lib.leftmenu.20.2.RO < lib.leftmenu.20.2.NO
lib.leftmenu.20.2.RO = 1
lib.leftmenu.20.2.RO.backColor = #eeeeee
lib.leftmenu.20.2.ACT < lib.leftmenu.20.2.NO
lib.leftmenu.20.2.ACT = 1
lib.leftmenu.20.2.ACT.10.fontColor = red
lib.leftmenu.20.3 = TMENU
lib.leftmenu.20.3.NO {
  allWrap = <tr><td>|</td></tr>
  linkWrap (
    <table border="0" cellpadding="0" cellspacing="0" style="margin:
2px; 0px; 2px; 0px;">
    <tr>
    <td><img src="clear.gif" width="15" height="1" /></td>
    <td><img src="fileadmin/arrow_gray.gif" height="9" width="9"
hspace="3" /></td>
    <td>|</td>
    </tr>
    </table>
  )
} 
 
lib.mycontent=TEXT
lib.mycontent.value= a text output
 
 
PAGE = PAGE
PAGE.typeNum = 0
PAGE.config.doctype = xhtml_trans
PAGE.stylesheet = fileadmin/examples/multimenu_autoparser2.css
 
plugin.tx_automaketemplate_pi1  {
  content = FILE
  content.file  = fileadmin/examples/multimenu_autoparser2-leftdyn.htm
  relPathPrefix =
  elements  {
    BODY.all  = 1
    BODY.all.subpartMarker  = DOCUMENT_BODY
    HEAD.all  = 1
    HEAD.all.subpartMarker  = DOCUMENT_HEADER
    HEAD.rmTagSections  = title
    TD.all  = 1
    TR.all  = 1
    DIV.all = 1
    SPAN.all  = 1
  }
}
 
 
temp.mainmenu = HMENU
temp.mainmenu.1 = TMENU
temp.mainmenu.1 {
  expAll = 1
  NO.ATagTitle.field = title
  wrap = <UL id="nav"> | </UL>
  NO.wrapItemAndSub = <LI> | </LI>
  ACT = 1
  ACT.wrapItemAndSub = <li> | </LI>
  ACT.ATagTitle.field = title
}
temp.mainmenu.2 = TMENU
temp.mainmenu.2 {
  expAll = 1
  NO.ATagTitle.field = title
  wrap = <UL id="level1"> | </UL>
  NO.wrapItemAndSub = <LI> | </LI>
  ACT = 1
  ACT.wrapItemAndSub = <LI> | </LI>
  ACT.ATagTitle.field = title
}
temp.mainmenu.3 = TMENU
temp.mainmenu.3 {
  expAll = 1
  NO.ATagTitle.field = title
  wrap = <UL id="level2"> | </UL>
  NO.wrapItemAndSub = <LI> | </LI>
  ACT = 1
  ACT.wrapItemAndSub = <LI> | </LI>
  ACT.ATagTitle.field = title
}
 
 
temp.rootlinepath = HMENU
temp.rootlinepath.entryLevel = 0
temp.rootlinepath.special = rootline
temp.rootlinepath {
1 = TMENU
1.NO.allWrap = |&nbsp;>&nbsp;
}
 
temp.headTemplate = TEMPLATE
temp.headTemplate {
  template =< plugin.tx_automaketemplate_pi1
  workOnSubpart = DOCUMENT_HEADER
}
 
 
 
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
  template   =< plugin.tx_automaketemplate_pi1
  workOnSubpart = DOCUMENT_BODY
  subparts.content < styles.content.get
  subparts.nav < temp.mainmenu
  subparts.pagetitle < temp.pagetitle
  subparts.rootlinepath < temp.rootlinepath
  subparts.leftmenu < lib.leftmenu
}
 
 
PAGE.10 < temp.mainTemplate
 
PAGE.headerData.10  < temp.headTemplate



More information about the TYPO3-english mailing list