[TYPO3] How do I get the root page's styles.content.getLeft

Bill Taroli bill.taroli at billsden.org
Fri Sep 22 01:36:32 CEST 2006


Mike wrote:
> Wow!  OK, is there a more direct way to refer to the root's 
> style.content.getLeft, or is this recursive thing the only way you 
> know of?  Thanks either way,
>
> mike
>
>
> At 12:37 PM 9/21/2006, you wrote:
>   
>> Mike schrieb:
>>     
>>> I want to do something like:
>>>
>>> page.10 < [rootpage].styles.content.getLeft
>>>
>>> How do I refer to the root page?
>>>
>>> And while I'm typing, how would I get the parent page?  (Would it be
>>> "styles.content.getLeft:-2")
>>>       
>> This might help as it shows the principles
>> lib.recursive=COA
>> lib.recursive{
>>          backlevel5 = CONTENT
>>          backlevel5 {
>>              table = tt_content
>>              select {
>>                  pidInList.data = leveluid: -6
>>                  orderBy = sorting
>>                  where = colPos=0
>>              }
>>              renderObj < lib.tt_content
>>              renderObj {
>>                  stdWrap.dataWrap=<a name="{field:uid}"></a>|
>>              }
>>          }
>>
>>          ...
>>     

Well, according to the TSRef
(http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/2/2/),
an example of getting the ID of the root-page of the site (level zero) is:

   ... leveluid : 0

So it seems that a negative number will "go up" that many levels... but
0 is 0. :-)

Hope it helps..

Bill



More information about the TYPO3-english mailing list