[TYPO3] active menu item sort/ display active menu item first

bernd wilke xoonsji02 at sneakemail.com
Sat Jun 14 02:40:01 CEST 2008


on Thu, 12 Jun 2008 17:13:05 -0700, Kathryn Blair wrote:

> 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.

I would not try to solve this with excludeUidList or doNotLink (this will 
only remove the link around the text which stays in the menu). I think 
you don't need to insert any constants or variables.

I would try two instances of differnt configurated menus like you intend.
but I would try to use NO and ACT:

first menu: use ACT until current level (conditions with pagelevel) to 
select only pages in actual rootline
remove normal entries on parent levels with:
	NO = 0

in the second menu remove pages from actual rootline with:
	ACT = 0

just an idea. not tested!

bernd
-- 
http://www.pi-phi.de/t3v4/cheatsheet.html


More information about the TYPO3-english mailing list