[TYPO3] active menu item sort/ display active menu item first
Kathryn Blair
artscoop at mail.arts.ubc.ca
Fri Jun 13 02:13:05 CEST 2008
Hi everybody,
Thanks for your help. I've sort of got the first & third menus working,
thanks to includeData=1 and {leveluid:1} (I am SO HAPPY that I found that!),
using special.list. I've got it set up so I have three menus -- one that
links the active tree node and children / parents, one that will link the
other main nodes, and one that links a bunch of pages that don't fit under
those nodes.
But I'm running into problems with the second menu that links the other
nodes. I can't figure out how to hide the active tree node in the second
menu -- for some reason, excludeUidList.insertData=1
/excludeUidList={leveluid:1} doesn't work. Is that by design? Is there some
other way to accomplish the same thing? On the top-level pages, I can use
excludeUidList=current, but that doesn't do me any good on the second level.
I don't know enough about alternate uses of excludeUidList (and I can't find
any by googling) that would let me use leveluid:1, which seems ridiculous.
I'm also not sure how to set a constant to leveluid:1, if it's possible.
Also, I can't do any of these things by setting first-level ACT to
doNotShowLink because I'm using some javascript to expand the page tree and
need to set expAll=1, but then I have no way of hiding (via typoScript) the
children of the first-level active link. (Although it would make sense if
doNotShowLink=1 would hide child links even if expAll=1 is set, but that's
not the case).
Here's some typoscript:
For the first (active branch only) menu on the top-level pages:
#Menu -- Shows only active audience branch of the tree
temp.menu_1 = HMENU
temp.menu_1.special=list
temp.menu_1.special.value.insertData=1
temp.menu_1.special.value={leveluid:1}
# First level menu-object, textual
temp.menu_1.1 = TMENU
temp.menu_1.1 {
wrap = {$menuwrap}
NO{
allWrap.insertData=1
allWrap={$menuliallwrap}
wrapItemAndSub ={$menuliallwrapitemandsub}
}
ACT = 1
ACT{
allWrap.insertData=1
allWrap={$actmenuliallwrap}
wrapItemAndSub= {$actmenuliallwrapitemandsub}
}
noBlur = 1
expAll = 1
}
For the second (excluding active branch) menu on the top-level pages [this
doesn't work for reasons discussed above]:
##Menu to render the other Audiences
temp.menu_2 = HMENU
temp.menu_2.excludeUidList.insertData=1
temp.menu_2.excludeUidList={leveluid:1}
# First level menu-object, textual
temp.menu_2.1 = TMENU
temp.menu_2.1 {
wrap = {$secondmenuwrap}
NO{
allWrap.insertData=1
allWrap={$menuliallwrap}
wrapItemAndSub= {$menuliallwrapitemandsub}
}
ACT = 1
ACT{
allWrap.insertData=1
allWrap={$actmenuliallwrap}
wrapItemAndSub= {$actmenuliallwrapitemandsub}
}
expAll=1
noBlur = 1
}
Thanks again for the help you've already given me, it was great. Any more
help with this is much appreciated -- it seems to defy logic that this
doesn't work.
Kathryn Blair
-----Original Message-----
From: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of Tomas
Mrozek
Sent: Wednesday, June 11, 2008 3:35 AM
To: typo3-english at lists.netfielders.de
Subject: Re: [TYPO3] active menu item sort/ display active menu item first
Well, it would be good if you could use something like...
alternativeSortingField.dataWrap = (uid={leveluid:1}) DESC, sorting ASC
...which you can NOT.
So, in my opinion, the best option for you is to construct the menu from
two HMENUs:
subparts.MENU = COA
subparts.MENU.10 = HMENU
subparts.MENU.20 = HMENU
The first one would have "doNotShowLink = 1" set for the normal items of
the first level (TMENU):
subparts.MENU.10.1.NO.doNotShowLink = 1
The second one would have "doNotShowLink = 1" set for the active items
of the first level (TMENU):
subparts.MENU.20.1.ACT.doNotShowLink = 1
Tomas Mrozek
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
More information about the TYPO3-english
mailing list