[TYPO3-UG US] TMENU CUR page?

Ron Hall ron at busynoggin.com
Thu Nov 2 00:42:37 CET 2006


To K from DC

You should basically do it the same way as you have done your other  
states. Something like:

	CUR = 1
	CUR.allWrap = <li class="cmLevel1"> | </li>

If you put it on the same level as your "IFSUB" and "ACTIFSUB" code  
then it will apply to the same level on the menu as those. If you  
want to affect the sub menus then you will need to code it into "10.2"

At the end of this e-mail there is working code from one of my sites  
that uses CUR. It may give you an idea of how to use it. I have  
included the code for the entire menu  so you can see it in context.

Just to let you know in case you haven't seen it before, I have  
enclosed many of my values with parenthesis so that I can write it in  
multiple lines and have it stay that way in the final HTML. In other  
words, these two sets of code would operate the same but just look  
different in the HTML source:

	lib.contextMenu.10.value (
<div id="contextMenuWrap">
					<div class="NavHeadingBar"><h3 class="NavHeadingBar">
	)

or

	lib.contextMenu.10.value = <div id="contextMenuWrap"><div  
class="NavHeadingBar"><h3 class="NavHeadingBar">



Ron Hall
Dallas, Texas

blog: "Adventures in TYPO3" at www.busynoggin.com/blog
web: www.busynoggin.com


SAMPLE CODE:

# SETUP OF CONTEXT MENU
	lib.contextMenu = COA
	lib.contextMenu.10 = HTML
	lib.contextMenu.10.value (
<div id="contextMenuWrap">
					<div class="NavHeadingBar"><h3 class="NavHeadingBar">
	)
	lib.contextMenu.12 = TEXT
	lib.contextMenu.12.value = {$pageSetup.contextMenu.title}
	lib.contextMenu.14 = HTML
	lib.contextMenu.14.value (
	</h3></div>
	)
	)
	lib.contextMenu.15 = HTML
	lib.contextMenu.15.value (
					<ul id="contextMenu">
	)
	lib.contextMenu.20 = HMENU
	lib.contextMenu.20.entryLevel = {$pageSetup.contextMenu.entry}
	lib.contextMenu.20.1 = TMENU
	lib.contextMenu.20.1 {
		# Normal State Properties
			NO.before (
			
						<li class="cmLevel1">
			)
			NO.after = </li>
		# Active state properties
			ACT = 1
			ACT.before (
			
						<li class="cmLevel1 active">
			)
			ACT.after = </li>
		# Current state properties  Level 1
			CUR = 1
			CUR.before (
			
						<li class="cmLevel1 current">
			)
			CUR.after = </li>
			}
	lib.contextMenu.20.2 = TMENU
	lib.contextMenu.20.2 {
		# Normal State Properties
			NO.before (
			
						<li class="cmLevel2">
			)
			NO.after = </li>
		# Active state properties
			ACT = 1
			ACT.before (
			
						<li class="cmLevel2 active">
			)
			ACT.after = </li>
		# Current state properties  Level 1
			CUR = 1
			CUR.before (
			
						<li class="cmLevel2 current">
			)
			CUR.after = </li>
			}
	lib.contextMenu.20.3 = TMENU
	lib.contextMenu.20.3 {
		# Normal State Properties
			NO.before (
			
						<li class="cmLevel3">
			)
			NO.after = </li>
		# Active state properties
			ACT = 1
			ACT.before (
			
						<li class="cmLevel3 active">
			)
			ACT.after = </li>
		# Current state properties  Level 1
			CUR = 1
			CUR.before (
			
						<li class="cmLevel3 current">
			)
			CUR.after = </li>
			}
	lib.contextMenu.25 = HTML
	lib.contextMenu.25.value (

					 </ul>
	)
	lib.contextMenu.30 = HTML
	lib.contextMenu.30.value (

				</div>
	)


More information about the TYPO3-UG-US mailing list