[TYPO3] Joining tables with Typo-Script
Frederic Gaus
mailinglists at necroshine.de
Sun Mar 5 16:11:03 CET 2006
JoH schrieb:
>>>> I'm searching for a solution for the following problem:
>>>> I want to create a page on which the content-elements of it's
>>>> subpage are shown. I've tried it with the following Typo3-code, but
>>>> it's not working. I've no clue what could be wrong.
>>> Have a look at this thread:
>>>
> http://lists.netfielders.de/pipermail/typo3-german/2006-February/011679.html
>> Thanks for your help. Now, I get too much ;). I get german and english
>> contents at the same time. How can I fix this?
>
> Assuming you trigger the languages with the URL-paremeter "L" one option you
> got with TS will be this:
>
> select {
> orderBy = sorting
> andWhere.dataWrap = sys_language_uid={GPvar:L}
> andWhere.if.isTrue.data = GPvar:L
> }
>
> Put it into the select part for tt_content but _not_ for pages.
I've tried this and again it's not fully functional.
L=0 or nothing is German
L=2 is english
Opening my page with &L=2, I see only english content-elements, as
expected. But all other combinations only return an empty site.
Whats wrong?
My TypoScript:
page.10.marks.CONTENT= COA
page.10.marks.CONTENT {
10 = CONTENT
10 {
table = tt_content
select {
andWhere.dataWrap = sys_language_uid={GPvar:L}
andWhere.if.isTrue.data = GPvar:L
orderBy = sorting
}
}
20 = CONTENT
20 {
table = pages
select {
orderBy = sorting
}
renderObj = CONTENT
renderObj {
table = tt_content
select {
andWhere.dataWrap = sys_language_uid={GPvar:L}
andWhere.if.isTrue.data = GPvar:L
pidInList.field = uid
orderBy = sorting
}
}
}
}
Thanks
Frederic
--
Frederic Gaus pgp-key: 93E6903C
fingerprint: 0C55 4517 CC1E 5F7F 9059 3535 AB54 D8E8 93E6 903C
More information about the TYPO3-english
mailing list