[TYPO3] Menu Active state

Nirmalya Mondal typo3india at gmail.com
Fri Sep 19 15:31:37 CEST 2008


rupali.ffm at googlemail.com wrote:
> sry, it didn't work...infact it has no any new effect generated.
> 
> On Thu, Sep 18, 2008 at 5:27 PM, Nirmalya Mondal <typo3india at gmail.com>wrote:
>>> Rupali
>> Hello,
>> Believe this will help you to resolve this issue.
>>
>> You can try this typoscript code for menu.
>> -------------------------------
>> lib.service_nav = HMENU
>> lib.service_nav.special = directory
>> lib.service_nav.special.value = 31
>> lib.service_nav{
>>  #entryLevel = 0
>>    1 = TMENU
>>   1 {
>>     expAll=1
>>     wrap = <ul id ="top_nav_ul"> |</ul>
>>      NO = 1
>>     NO.allWrap.insertData=1
>>     #change  to allWrap=<li id="menuitem{field:title}">| if you want
>> the title instead of the uid as css id
>>     NO.allWrap=<li id="menuItem{field:uid}">|
>>     NO.wrapItemAndSub = |</li>
>>
>>     ACT = 1
>>     ACT.ATagParams = class="firstLevelAct"
>>     ACT.allWrap.insertData=1
>>     ACT.wrapItemAndSub.insertData = 1
>>     ACT.allWrap=<li id="menuItem{field:uid}">|
>>     ACT.wrapItemAndSub = | </li>
>>    }
>> }
>> ---------------------
>> In typoscript setup of root page.
>> ------------------------------
>> [globalVar = TSFE:id = 30]
>> page.headerData.100 = TEXT
>> page.headerData.100.value (
>>     <style type="text/css">
>>         #top_nav_ul #menuitem35 {text-decoration: none; color:#FFFFFF;
>> background-color:red}
>>     </style>
>> )
>> end]
>> ---------------
>> here 30 is the page id where home page will look red bgcolor.
>> and #menuitem35 >> 35 is page id of home page.
>> _______________________________________________
>> TYPO3-english mailing list
>> TYPO3-english at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>>

Rupali,

View page HTML source code in Front End of this page
http://serviceforce.duke2007.taunus.de/index.php?id=35&L=1
You'll definitely get unique css id is wrapped with all <li> tags of 
menu structure. Like <li id="menuItem35" ><a ...>Home</a> okay.
It may be different "menuItem35".
Now you can define this <li id="menuItem35" > tag by css.
That css will only be included in front-end when you are browsing page 
id=30. This id=30 is a condition that has been set in typoscript setup 
of root pages template.

-- 
Thank You.
Kind Regards,
Nirmalya Mondal
http://www.edimensions.in
--------------------------------
Phone: +91-990-3743-222
Skype: typo3developer
Yahoo: enirmalya at yahoo.com
Web:   http://www.nirmalya.info


More information about the TYPO3-english mailing list