[TYPO3-UG US] TMENU CUR page
K from DC
kfromdc at gmail.com
Thu Nov 2 23:25:23 CET 2006
Thank you guys for your responses. I followed your suggestions and ended up
with some progress but not quite what I was expecting...
temp.rmenu = COA
temp.rmenu {
10 = HMENU
10.wrap = <div id="menur"><ul>|</ul></div>
10.special = directory
10.special.value = 1636
10.1 = TMENU
10.1 {
expAll = 1
stayFolded = 0
itemArrayProcFunc = user_foldoutMenu->getIfSubUidList
NO {
ATagParams = class="no"
allWrap = <li>|</li>
}
IFSUB < .NO
IFSUB = 1
IFSUB {
subst_elementUid = 1
allWrap = <li>|<ul id="rmenu-{elementUid}">
wrapItemAndSub = |</ul></li>
}
#THE NEW SECTION
C {
ATagParams = class="cur"
allWrap = <li>|</li>
}
CUR < .C
CUR = 1
# --
ACTIFSUB < .IFSUB
ACTIFSUB = 1
ACTIFSUB.allWrap = <li>|<ul id="rmenu-{elementUid}"
style="display:block;">
}
10.2 < .10.1
10.3 < .10.1
10.4 < .10.1
10.5 < .10.1
This new addition sure adds class="cur" to the current link but it also
messes up the menu. All of a sudden the immediate only subdirectories of a
directory become its siblings, until I click on that subdirectory. Then it
behaves like a subdirectory but its clildren become its siblings in their
turn. And I feel like I've been walking in circles all day today...
Thanks again.
LB
On 11/2/06, typo3-ug-us-request at lists.netfielders.de <
typo3-ug-us-request at lists.netfielders.de> wrote:
>
> Send TYPO3-UG-US mailing list submissions to
> typo3-ug-us at lists.netfielders.de
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-ug-us
> or, via email, send a message with subject or body 'help' to
> typo3-ug-us-request at lists.netfielders.de
>
> You can reach the person managing the list at
> typo3-ug-us-owner at lists.netfielders.de
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of TYPO3-UG-US digest..."
>
>
> Today's Topics:
>
> 1. TMENU CUR page? (K from DC)
> 2. Re: TMENU CUR page? (Dennis Shewmaker)
> 3. Re: TMENU CUR page? (Ron Hall)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 1 Nov 2006 17:43:06 -0500
> From: "K from DC" <kfromdc at gmail.com>
> Subject: [TYPO3-UG US] TMENU CUR page?
> To: typo3-ug-us at lists.netfielders.de
> Message-ID:
> <mailman.7403.1162420992.30218.typo3-ug-us at lists.netfielders.de>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hello there. I'm a Typo3 n00b and rather confused with TS at this point.
>
> This is what I have:
>
> temp.rmenu {
>
> 10 = HMENU
> 10.wrap = <div id="menur"><ul>|</ul></div>
> 10.special = directory
> 10.special.value = 1636
> 10.1 = TMENU
> 10.1 {
> expAll = 1
> stayFolded = 0
> itemArrayProcFunc = user_foldoutMenu->getIfSubUidList
> NO {
> ATagParams = class="no"
> allWrap = <li>|</li>
> }
>
> IFSUB < .NO
> IFSUB = 1
> IFSUB {
> subst_elementUid = 1
> allWrap = <li>|<ul id="rmenu-{elementUid}">
> wrapItemAndSub = |</ul></li>
> }
> ACTIFSUB < .IFSUB
> ACTIFSUB = 1
> ACTIFSUB.allWrap = <li>|<ul id="rmenu-{elementUid}"
> style="display:block;">
> }
> ....
> which works fine, but the menu doesn't show what the current page is. what
> I'd like is to add some kind of class name to the current page so that I
> can
> apply some CSS. i know that the current page is CUR but don't know how to
> use it. Tanks in advance. LB
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 01 Nov 2006 16:11:44 -0700
> From: Dennis Shewmaker <dshewmaker at promission.net>
> Subject: Re: [TYPO3-UG US] TMENU CUR page?
> To: typo3-ug-us at lists.netfielders.de
> Message-ID:
> <mailman.1.1162422706.15144.typo3-ug-us at lists.netfielders.de>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi K from DC,
>
> Use ACT for active menu if I remember correctly. Have a look at this:
>
> http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/8/11/
>
> see code below for quick example.
>
> K from DC wrote:
> > temp.rmenu {
> >
> > 10 = HMENU
> > 10.wrap = <div id="menur"><ul>|</ul></div>
> > 10.special = directory
> > 10.special.value = 1636
> > 10.1 = TMENU
> > 10.1 {
> > expAll = 1
> > stayFolded = 0
> > itemArrayProcFunc = user_foldoutMenu->getIfSubUidList
> > NO {
> > ATagParams = class="no"
> > allWrap = <li>|</li>
> > }
>
> Just taking some from your code:
>
> ACT < .NO
> ACT = 1
> ACT.allWrap = <li> <strong> | </strong> </li>
>
> >
> > IFSUB < .NO
> > IFSUB = 1
> > IFSUB {
> > subst_elementUid = 1
> > allWrap = <li>|<ul id="rmenu-{elementUid}">
> > wrapItemAndSub = |</ul></li>
> > }
> > ACTIFSUB < .IFSUB
> > ACTIFSUB = 1
> > ACTIFSUB.allWrap = <li>|<ul id="rmenu-{elementUid}"
> > style="display:block;">
> > }
> > ....
> > which works fine, but the menu doesn't show what the current page is.
> what
> > I'd like is to add some kind of class name to the current page so that I
> > can
> > apply some CSS. i know that the current page is CUR but don't know how
> to
> > use it. Tanks in advance. LB
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 1 Nov 2006 17:42:37 -0600
> From: Ron Hall <ron at busynoggin.com>
> Subject: Re: [TYPO3-UG US] TMENU CUR page?
> To: TYPO3 Usergroup America <typo3-ug-us at lists.netfielders.de>
> Message-ID:
> <mailman.7495.1162424560.30218.typo3-ug-us at lists.netfielders.de>
> Content-Type: text/plain; charset=US-ASCII;
> delsp=yes; format=flowed
>
> 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>
> )
>
> ------------------------------
>
> _______________________________________________
> TYPO3-UG-US mailing list
> TYPO3-UG-US at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-ug-us
>
> End of TYPO3-UG-US Digest, Vol 19, Issue 2
> ******************************************
>
More information about the TYPO3-UG-US
mailing list