[TYPO3-english] newbie - menu problem

Lex Thoonen Lex at peng.nl
Fri Sep 18 03:29:07 CEST 2009


Sunday, September 13, 2009, 8:37:36 AM, you wrote:

ML> If you're using a different template on subpages you need to add the 
ML> menu to the template - use the TemplaVoila module, look at the DS 
ML> (DataStructure) and the mapped elements on your frontpage and see if you
ML> can figure out how to do the same thing on your subpages template.



Hi Michael (and others),

well I'm not using a different template on subpages, but it still just
disappears. Must be something simple that I don't see.

Here's the page:
http://www.oerdis.nl/index.php
with the menu as it should be (for now).

It vanishes as soon as I click to another page though.



Here's the code:



# Menu 1 cObject
temp.menu_1 = HMENU 
  # First level menu-object, textual 
temp.menu_1.1 = TMENU 
temp.menu_1.1 { 
    # Normal state properties 
  NO.allWrap = <li class="menu1-level1-no"> | </li> 
    # Enable active state and set properties: 
  ACT = 1 
  ACT.allWrap = <li class="menu1-level1-act"> | </li>
} 

# Second level menu-object, textual 
temp.menu_1.2 = TMENU 
temp.menu_1.2 { 
    # Normal state properties 
  NO.allWrap = <li class="menu1-level2-no"> | </li> 
    # Enable active state and set properties: 
  ACT = 1 
  ACT.allWrap = <li class="menu1-level2-act"> | </li> 
}

# 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 ###nav### subpart with dynamic menu:
  subparts.nav < temp.menu_1     

    # Substitute the ###main### subpart with some example content:
  subparts.main < styles.content.get 

    # Substitute the ###sidebar### subpart with some example content:
  subparts.sidebar < styles.content.getRight
  
    # Substitute the ###brcr### subpart with bread crumbs extension:
  subparts.brcr < temp.breadCrumb

}


Well, for now, to just be able to see the menu on all pages with this
template would be great. However, actually I'd like a (dynamic) menu
like this:

http://typo3.intervation.de/int-extensionen/int-ypslideoutmenu.html

So I installed the extension, and changed the above part in the code
in the main template to be like this:



######
#
# Snippets by http://typo3.intervation.de/int-extensionen/int-ypslideoutmenu.html
#
####

lib.menue = HMENU
lib.menue {
  special = directory
  special.value = 5
  stdWrap.dataWrap = <ul>|</ul>
  stdWrap.required = 1
 
  korek_css = padding-bottom:20px;margin-left:1px;text-align:left
  aniLen = 800
  hideDelay = 5
  minCPUResolution = 10 
  kore_so_x = -2
  div_id_layer = yymenu

  1 = tx_menu_ypslideoutmenu
  1 {
  
    expAll=1
    NO = 1 
    NO {
      linkWrap = <span>|</span>
      ATagBeforeWrap = 1
      allWrap = <li>|</li>
    }
  }
  2 = tx_menu_ypslideoutmenu
  2 { 
      moveTo = down
      height = 22
      width = 177
      expAll=1
      NO {
      }
  }
  3 < .2
  3.moveTo = right
  3.width= 177
  
}



# 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 ###nav### subpart with dynamic menu:
  subparts.nav < lib.menue     

    # Substitute the ###main### subpart with some example content:
  subparts.main < styles.content.get 

    # Substitute the ###sidebar### subpart with some example content:
  subparts.sidebar < styles.content.getRight
  
    # Substitute the ###brcr### subpart with bread crumbs extension:
  subparts.brcr < temp.breadCrumb

}




But the result would be nothing. In the source code of the page would
be this where the navigation should be:

<div id="nav"></div>

I know I should change the <ul> etc in the lib.menue { part, but as
the result is zero i thought that would be something I can do once it
runs.


Now, I'm well aware these are newbie problems, so I'm sorry for this,
but believe me: I've been reading and reading but just haven't been
able to solve any of this. (Luckily, I have been able to get the site
as far as this ;)

Any clue or hint or solution is appreciated people. I've got the nasty
feeling that my problems mentioned above are very basic things that I
must have missed in the docs that I've been reading.

Thanks!


-- 
Lex Thoonen
Pêng Smart Web Design - http://www.peng.nl
Gran Canaria Info     - http://www.gran-canaria-info.com
Hollandse Nieuwe      - http://www.hollandsenieuwe.com
tel. +34 928 88.61.77



More information about the TYPO3-english mailing list