[TYPO3-english] Add a link to the parent menu item in submenu
Tyler Kraft
tyler.kraft at netefficiency.co.uk
Fri Sep 4 16:18:48 CEST 2009
Hi
Firstly it's typo3 (not typo, thats a different piece of software - big
difference ;-) )
What I gave you would give cars (and all its siblings) in nav 10, and
cars children in nav 20 when on cars. If you were on 'trucks' - the
sibling to cars - then nav.20 would give the childrne of trucks.
If you only want cars then you probably want something like this:
temp.nav = HMENU
temp.nav{
10 = TMENU
10.wrap = <ul>|</ul>
10.NO.doNotLinkIt = 1
10.NO.doNotShowLink=1
10.CUR = 1
10.CUR.wrapItemAndSub = <li>|</li>
10.CUR.doNotLinkIt=1
10.ACT=1
10.ACT.wrapItemAndSub = <li>|</li>
20=TMENU
20.wrap = <ul>|</ul>
20.NO.doNotLinkIt = 1
20.NO.doNotShowLink=1
20.NO.allWrap = <li>|</li>
20.CUR = 1
20.CUR.allWrap = <li>|</li>
20.CUR.doNotLinkIt=1
}
All of this is in TSref under the menu section
hth
Daniel Rutzen wrote:
> Thank you Tyler!
>
> I kinda thought of that as well, but what I don't get is:
>
> How do I make Typo to list only the sub items in the nav.20, and only
> the single parent main (CARS) item in nav.10 (and not all main items).
>
> I'm a bit confused :D
>
>
>
> At the moment, this is my Setup for the left second menu (for testing I
> hardcoded the 1st item)
>
>
> subparts.leftnavi = HMENU
> subparts.leftnavi {
>
> entryLevel = 1
> wrap= <li><a class="first" href="#">cars</a><ul> |
> </ul></li>
>
> 1 = TMENU
> 1.
> 1.NO.wrapItemAndSub= <li> | </li>
>
> #CUR zustand
> 1.CUR = 1
> 1.CUR < .1.NO
>
> #ACT-Zustand
> 1.ACT = 1
> 1.ACT < .1.CUR
>
>
> }
>
>
>
>
>
>
>
> Tyler Kraft schrieb:
>> Opps - a small mistake (its probably not 100% as you need it but it
>> should give a basic idea for you. Check TSref for more info)
>>
>>
>> temp.nav = HMENU
>> temp.nav{
>> 10=TMENU
>> 10.wrap = <ul>|</ul>
>> 10.NO.wrapItemAndSub = <li>|</li>
>> 10.ATagParams = class="first"
>>
>> 20 =TMENU
>> 20.wrap = <ul>|</ul>
>> 20.NO.allWrap = <li>|</li>
>> }
>>
>>
>>
>> Daniel Rutzen wrote:
>>> Hello,
>>>
>>> I have a horizontal main menu and a vertical submenu. In the submenu,
>>> there are ony the sub-items listed from the parent main menu item.
>>>
>>> Let's say I have a main menu item 'cars' and sub pages for colors.
>>> I've got it working that the second menu now shows the coresponding
>>> sub items, each in a <li></li> Tag:
>>>
>>> <li>blue cars</li>
>>> <li>red cars</li>
>>> <li>green cars</li>
>>>
>>>
>>> What I would like to have is, that the first <li>-Element has a link to
>>> the parent main menu item, and the sub items are in another <ul>
>>> within the parent <li>
>>>
>>> <ul>
>>> <li>CARS
>>> <ul>
>>> <li>blue cars</li>
>>> <li>red cars</li>
>>> <li>green cars</li>
>>> </ul>
>>> </li>
>>> </ul>
>>>
>>>
>>> This is a snippet from my HTML test template, how it should like in
>>> the end....
>>>
>>>
>>> <ul id="secondmenu">
>>> <!-- ###leftnavi### start -->
>>>
>>> <li><a href="#" class="first">CARS</a>
>>> <ul>
>>> <li><a href="#">blue cars</a></li>
>>> <li><a href="#">red cars</a></li>
>>> <li><a href="#">green cars</a></li>
>>> </ul>
>>> </li>
>>>
>>> <!-- ###leftnavi### end -->
>>> </ul><!-- secondmenu end -->
>>>
>>>
>>>
>>>
>>> I hope I was able to explain what I am trying to do here :-)
>
More information about the TYPO3-english
mailing list