How to … integrate a YAML Menu to TYPO3

How to

If you want to use YAML with TYPO3 you will need some code snipptes for the HMENU in TypoScript. I have made my own structure, let’s  have a look …

First tell TYPO3 where the Menu should be appear, you can do this with ###MARKERS### in your template or use TemplaVoila (lib.menu).

Then you have do build the HMENU Object:

lib.menu = HMENU
lib.menu {
 1 = TMENU
 entryLevel = 0
  wrap = <ul class="vlist">|</ul> 
1 {
 #delete blurtag
noBlur = 1
 #expand menu?
 expAll = 1 
 NO = 1
 NO.wrapItemAndSub = <li>|</li>
 NO.ATagTitle.field = title
 CUR = 1
 CUR {
 wrapItemAndSub = <li>|</li>
 ATagParams= class="active"
 }
 }
 2 < .1
 2.wrap = <ul>|</ul>
# 3,4, ... expand for more levels
}

Now TYPO3 will generate a nice Menu and you can style it with CSS.
If you like my idea – leave a comment.

Greetz
Martin

Related posts:

  1. mixed TypoScript Snippets Vol. 1
  2. How to … change the title-element in TYPO3
  3. How to … set permission chmod for TYPO3
  4. How to … change the standard target for links in TYPO3
  5. How to … add metatags to TYPO3 website
  6. How to … set the favicon in TYPO3
  7. How to delete csc-default and id tag in TYPO3 4.3
  8. How to code a jQuery slider menu

3 Responses to “How to … integrate a YAML Menu to TYPO3”


  1. 1 Tschuege
  2. 2 RaiulBaztepo

    Hello!
    Very Interesting post! Thank you for such interesting resource!
    PS: Sorry for my bad english, I’v just started to learn this language ;)
    See you!
    Your, Raiul Baztepo

  1. 1 TV & YAML: dynamisches Men

Leave a Reply