[TYPO3] foldout menu : i see menu-item2 instead of the tree i made

Roelof Wobben rwobben at hotmail.com
Sat Feb 10 16:07:37 CET 2007


Hello,

My setup looks like this :

page.config.doctype = xhtml_trans

// --- CONSTANTS start -----------------------

lib.zmenu {

  imgFolder = typo3conf/ext/foldoutmenu/examples/vertical/images/

  collapseImg = arrow_right.gif

  expandImg = arrow_down.gif

}

// --- CONSTANTS end -------------------------







// --- SETUP start ---------------------------

includeLibs.foldoutmenu = typo3conf/ext/foldoutmenu/foldoutmenu.php



lib.zmenu = COA

lib.zmenu {



  10 = HMENU

  10.wrap = <div id="menuz"><ul>|</ul></div>

  10.entryLevel = 1

  10.1 = TMENU

  10.1 {

    expAll = 1

    itemArrayProcFunc = user_foldoutMenu->getIfSubUidList

    NO {

      stdWrap.cObject = COA

      stdWrap.cObject {

        10 = CLEARGIF

        10.width=9

        10.wrap = |

        20 = TEXT

        20.field = title

      }

      ATagParams = class="no"

      allWrap = <li>|</li>

    }

    CUR < .NO

    CUR = 1

    CUR.ATagParams = class="act"

    IFSUB < .NO

    IFSUB = 1

    IFSUB {

      doNotLinkIt = 1

      subst_elementUid = 1

      stdWrap.cObject = COA

      stdWrap.cObject {

        10 >

        10 = IMAGE

        10.file = {$lib.zmenu.imgFolder}{$lib.zmenu.collapseImg}

        10.altText = Click to open

        10.titleText = Click to open

        10.params = align="top" id="zmenu-{elementUid}-0"

      }

      linkWrap = <A href="javascript:;" 
onmousedown="zmenu.foldMenu('zmenu-{elementUid}');return false;" 
style="cursor: pointer;cursor: hand;" class="no">|</a>

      allWrap = <li>|<ul id="zmenu-{elementUid}">

      wrapItemAndSub = |</ul></li>

    }

    ACTIFSUB < .IFSUB

    ACTIFSUB = 1

    ACTIFSUB.stdWrap.cObject.10.file = 
{$lib.zmenu.imgFolder}{$lib.zmenu.expandImg}

    ACTIFSUB.stdWrap.cObject.10.altText = Click to close

    ACTIFSUB.stdWrap.cObject.10.titleText = Click to close

    ACTIFSUB.stdWrap.cObject.10.params = align="top" 
id="zmenu-{elementUid}-0"

    #ACTIFSUB.allWrap = <li>|<ul id="zmenu-{elementUid}" 
style="display:block;">

    CURIFSUB < .IFSUB

    CURIFSUB = 1

    CURIFSUB.linkWrap = <A 
onmousedown="zmenu.foldMenu('zmenu-{elementUid}');return false;" 
style="cursor: pointer;cursor: hand;" class="act">|</a>

  }

  10.2 < .10.1

  10.3 < .10.1

  10.4 < .10.1



  20 = TEXT

  20.data = register:ifSubUidList

  20.postUserFunc = user_foldoutMenu->JSWrapper

  20.postUserFunc.prefix = zmenu

  20.postUserFunc.startFolded = 1

  20.postUserFunc.autoFold = 1

  20.postUserFunc.foldCurrent = 1

  20.postUserFunc.enableCookie = 1

  20.postUserFunc.imagePath = {$lib.zmenu.imgFolder}

  20.postUserFunc.imageSwap 
=	["{$lib.zmenu.collapseImg}","{$lib.zmenu.expandImg}"]

  20.postUserFunc.altSwap =	["Click to open","Click to close"]

  20.required = 1

}



// --- CSS Styles start ----------------------

page.CSS_inlineStyle (

	#menuz {width: 160px;font: normal normal normal 11px/13px Arial, Helvetica, 
sans-serif;}

	#menuz ul {list-style: none;margin: 0px;padding: 0px;}

	#menuz ul ul {display:none;}

	#menuz A.no, #menuz A.act {color: #000000;text-decoration: none;}

	#menuz A.act, #menuz A.act:hover { font-weight : bold;}

	#menuz {border-top:1px solid black;border-right:1px solid 
black;border-left:1px solid black;}

	#menuz A {display:block;border-bottom:1px solid #005073;padding: 3px 5px 
3px 5px;}

  *html #menuz A {width: 100%;} /* IE */

	#menuz UL IMG {margin:2px 3px 2px 0px;}

	#menuz UL UL IMG {margin-left:6px;}

	#menuz UL UL UL IMG {margin-left:12px;}

	#menuz UL A {background: #0191cc;}

	#menuz UL A:hover {background: #80c8e6;}

	#menuz UL LI UL A {background: #3ebcef;}

	#menuz UL LI UL A:hover {background: #9fdef7;}

	#menuz UL LI UL LI UL A {background: #8dcff3;}

	#menuz UL LI UL LI UL A:hover {background: #c6e7f9;}

	#menuz UL LI UL LI UL LI UL A {background: #aee1fd;}

	#menuz UL LI UL LI UL LI UL A:hover {background: #ebf7fe;}

)

// --- CSS Styles end ------------------------



// --- SETUP end -----------------------------


Configuring the Auto-Parser for main template:

plugin.tx_automaketemplate_pi1 {

  # Read the template file:

content = FILE

content.file = fileadmin/template/main/template_1.html


  # Here we define which elements in the HTML that

  # should be wrapped in subpart-comments:

elements {

  BODY.all = 1

  BODY.all.subpartMarker = DOCUMENT_BODY


  HEAD.all = 1

  HEAD.all.subpartMarker = DOCUMENT_HEADER

  HEAD.rmTagSections = title


  TD.all = 1

}


  # Prefix all relative paths with this value:

relPathPrefix = fileadmin/template/main/

}

# Main TEMPLATE cObject for the BODY

temp.mainTemplate = TEMPLATE

temp.mainTemplate {

  # Feeding the content from the Auto-parser to the TEMPLATE cObject:

template =< plugin.tx_automaketemplate_pi1

  # Select only the content between the <body> tags

workOnSubpart = DOCUMENT_BODY


  # Substitute the ###menu_1### subpart with dynamic menu:

subparts.menu_1 < zmenu


  # Substitute the ###content### subpart with some example content:

subparts.content < styles.content.get



}



# Main TEMPLATE cObject for the HEAD

temp.headTemplate = TEMPLATE

temp.headTemplate {

  # Feeding the content from the Auto-parser to the TEMPLATE cObject:

template =< plugin.tx_automaketemplate_pi1

  # Select only the content between the <head> tags

workOnSubpart = DOCUMENT_HEADER

}





# Default PAGE object:

page = PAGE

page.typeNum = 0


# Copying the content from TEMPLATE for <body>-section:

page.10 < temp.mainTemplate


# Copying the content from TEMPLATE for <head>-section:

page.headerData.10 < temp.headTemplate


When i now look at my site.  the menu looks like this :

menu-item1
menu-item2
  submenu -item 1
menu-item 3

when i must look like this :

home
zwangerschap
    februari 2005
1e levensjaar

What went wrong here ?

Roelof

_________________________________________________________________
Windows Live Mail: Kies je eigen kleur, indeling en contacten! 
http://imagine-windowslive.com/mail/launch/default.aspx?Locale=nl-nl



More information about the TYPO3-english mailing list