Create menu from folder

Sometimes we need to create menus or list of items that are not strictly reflecting the current page-structure.
Using “special” property of hierarchical menus (HMENU) we can change the way menu is generated.


special = directory
special.value = 1

Setting HMENUs “special” property to “directory” enables us to create new menu from pages (and their child pages) selected in special.value property (e.g. special.value = 100, 101, 102). If no value is specified, default pid is the current page.


lib.folder_links = HMENU
lib.folder_links{
 special = directory
 special.value = 1 # id of parent item
 1 = TMENU
 1 {
  wrap = <ul class="link">|</ul>
  expAll = 1
  NO.wrapItemAndSub = <li>|</li>
  ACT < .NO
  ACT = 1
  ACT.ATagParams = class="active"
 }
}

special property of hierarchical menus can have these values: “directory” / “list” / “updated” / “browse” / “rootline” / “keywords” / “language” and they are explained in detail on http://wiki.typo3.org/TSref/HMENU.