[TYPO3-dev] Alter foreign_table_where to select items from parent page
Brian Bendtsen
nightowl at galnet.dk
Mon Apr 23 16:08:53 CEST 2007
JoH asenau skrev:
>> select * FROM tx_ebbolig_afdeling INNER JOIN pages ON
>> tx_ebbolig_afdeling.pid = pages.pid WHERE pages.uid = 65;
>>
>> Where 65 is the uid where my subitems is located. It, as it should,
>> returns the items from the parent folder.
>>
>> I have tried to make the same sql in my TCA like this:
>>
>> "foreign_table" => "tx_ebbolig_afdeling",
>> "foreign_table_where" => "AND pages.uid=###CURRENT_PID### ORDER BY
>> tx_ebbolig_afdeling.uid",
>>
>> But this doesnt work. I get an empty select box.
>
> Could you please explain the structure.
> What I understood is this:
>
> Sysfolder
> Item 1
> Item 2
> Sysfolder
> Item A
> Item B
>
> And you want a relation between
> Item 1 <=> Item A
> Item 2 <=> Item A
> Item 1 <=> Item B
> Item 2 <=> Item B
>
> Something like that?
>
> Joey
>
Yes, that is what I mean.
/BB
More information about the TYPO3-dev
mailing list