Erweitertes Menü

tmp.page_menu = HMENU
tmp.page_menu {
	1 = TMENU
	1 {
		expAll = 1
		wrap = <ul class="p-nav-l1">|</ul>

		NO = 1
		NO {
			# Simple wrap or...
			wrapItemAndSub = <li>|</li>
			
			# ... "first", ..., "middle", ..., "last" - classes
			#wrapItemAndSub = <li class="first">|</li> |*| <li class="middle">|</li> |*| <li class="last">|</li>
			
			# Add "active" to shortcuts
			ATagParams = class = "p-nav-active"
			ATagParams.if {
				value = 4
				equals.field = doktype
				isTrue = 1
				isTrue.if {
					value.data = TSFE:page|uid
					equals.field = shortcut
				}
			}
		}

		ACT = 1
		ACT.ATagParams = class = "p-nav-active"
		ACT.wrapItemAndSub = <li class ="p-nav-active">|</li>

		# Add "sub" to <li> or...
		#IFSUB = 1
		#IFSUB.wrapItemAndSub = <li class ="p-nav-sub">|</li>

		#ACTIFSUB < .ACT
		#ACTIFSUB.wrapItemAndSub = <li class ="p-nav-active p-nav-sub">|</li>

		# ...with an <span> tag
		IFSUB < .NO
		IFSUB {
			linkWrap = <span class="p-nav-has-sub"></span> |
			ATagBeforeWrap = 1
		}

		ACTIFSUB < .ACT
		ACTIFSUB {
			linkWrap = <span class="p-nav-has-sub"></span> |
			ATagBeforeWrap = 1
		}
	}

	2 < .1
	2 {
		wrap = <ul class="p-nav-l2">|</ul>
	}

	3 < .1
	3 {
		wrap = <ul class="p-nav-l3">|</ul>
	}

	4 < .1
	4 {
		wrap = <ul class="p-nav-l4">|</ul>
	}
}