[TYPO3] problem with insertdata and wrap

luca mingusthecat at gmail.com
Thu Jun 19 18:41:00 CEST 2008


Hi Lee
I totally understand your concerning...the choose to change the class of 
the menubox is to meet the designer requirement to change background and 
colors for any mainmenu item and display a submenu on different 
background  (not easy as kickstart!!!)
Anyhow your suggestion worked right but the problem seems that with 
{page:uid} i get an id which is not corrisponding to the main menu uid.
if I use {page:pid} I got the right pid but only in subpages and not at 
the main level (if I click the main menu item, e.g.).
About the div used as spacer, that seems coreect the behaviour in ff and ie.

I was wondering if I can use the PIDinRootline function to check if the 
main menu id is in the rootline of the selected submenu and wrap 
subsequently...but still not clear how to use if/switch conditions.

## subMenu [Begin]
lib.subMenu= HMENU
lib.subMenu.entryLevel = 1
lib.subMenu{
stdWrap.dataWrap = <div class="LeftMenuBox-id{page: pid}"><div 
style="height:70px;"></div>|</div>
}
lib.subMenu.1 = TMENU
lib.subMenu.1 {
stdWrap.wrap = <ul id="LeftMenuList">|</ul></div>
}
lib.subMenu.1.NO {
	allWrap = <li>|</li>
}
lib.subMenu.1.ACT = 1
lib.subMenu.1.ACT.allWrap =  <li class="LeftMenu-ACT">|</li>
## subMenu [End]

Thanks again for your help and to take time to review this.

Regards

Luca


lee perry ha scritto:
> hey luca,
> 
>> Lerry,
>> I understand
>>
>> ## subMenu [Begin]
>> lib.subMenu = HMENU
>> lib.subMenu.entryLevel = 1
>> lib.subMenu{
>> stdWrap.dataWrap = <div class="LeftMenuBox-id{field:pid}">|</div>
>> }
> 
> Do you really want to wrap your whole subMenu with a different className 
> or different id on every page? Than use {page:uid} - with this 
> dataWrapping you will get on every page this different className (in 
> this case of 'class="LeftMenuBox-id{page:uid}"') - an id would be 
> better, but I don't know why do you need this...
> 
>> lib.subMenu.1 = TMENU
>> lib.subMenu.1 {
>> stdWrap.dataWrap = <div style="height:70px;"></div><ul 
>> id="LeftMenuList">|</ul>
>> }
> 
> There is no data to insert anymore, so you can use the normal stdWrap.wrap
> What do you want with this empty div with the height of 70px before the 
> list - as spacing? It would be nicer when you will do the spacing only 
> with a margin-top: 70px; of the ul-tag.
> But maybe you will have another reason... (and it has nothing to do with 
> TYPO3 ;))
> 
>> lib.subMenu.1.NO {
>>     allWrap = <li>|</li>
>> }
>> lib.subMenu.1.ACT = 1
>> lib.subMenu.1.ACT.allWrap =  <li class="LeftMenu-ACT">|</li>
>> ## subMenu [End]
>>
>> this seems to work but either {field:pid} or {field:uid} doesn't 
>> return any value
> 
> {field:uid} should working as same as {page:uid} - anyway try 
> {page:uid}, but think about my questions above.
> 
>>
>> Grazie!!!
>> L
> 
> Prego.
> Lee
> 
> PS.: it's not necessary to send this news to my email-address as CC - I 
> will read it in the newsgroup.


More information about the TYPO3-english mailing list