[TYPO3] Getting parent id in menu

Patxi Goitia pgoitia at euskalnet.net
Tue May 22 20:49:56 CEST 2007


PIDinRootline seems interesting, but the problem is that if I click on 
Part B\Recipes, Common content\Recipes is 'displayed', so any work on TS 
will follow the path Root\Common content\Recipes...

What I need is a way to know in Root\Common content\Recipes is, 'from' 
where it has been called...

It's tricky and I didn't pay attention to this during the design time of 
the tree...

Christopher Torgalson wrote:
> Hi,
> 
> On 5/22/07, Patxi Goitia <pgoitia at euskalnet.net> wrote:
>> I repost a question of few days ago... It's a problem of shortcuted
>> pages not inheriting 'caller' contants:
>>
>> ---
>>
>> Hi, I have this structure of pages
>>
>> Root
>>    |
>>    |___Part A
>>    |     |______ News
>>    |     |______ Recipes [Shortcut to "Common content\Recipes"]
>>    |
>>    |
>>    |___Part B
>>    |     |______ News
>>    |     |______ Recipes  [Shortcut to "Common content\Recipes"]
>>    |
>>    |
>>    |___Common content
>>          |______ Recipes
>>
>>
>> Part A and Part B have each a value defined in template\constant named
>> BackgroundColor
>>
>> Can I specify in Common content\Recipes that value BackgroundColor is
>> the callers (father) value ?
>>
>> Now, when I go to Part A\News or Part B\News, I have {$BackgroundColor}
>> instead of having the color value for each 'father' page...
> 
> 
> I'm not sure without testing, but I think there may be an easier way then:
> 
> 1. You can use conditions in the constants field of TS templates
> 2. There is a nice condition called PIDinRootline that tests whether a
> page is in the 'rootline' of a given page id (I'd give you a link, but
> the TSref).
> 
> Try something like this--it should be simple enough to maintain as
> long as there aren't dozens of pages where this needs to happen:
> 
> [PIDinRootline=1]
>  constant = value1
> [PIDinRootline=2]
>  constant = value2
> [PIDinRootline=3]
>  constant = value3
> [global]
> 
> 


More information about the TYPO3-english mailing list