[TYPO3-english] Condition mapping values
Nesto
facckerr at alibaba.yo
Sat Sep 5 15:24:56 CEST 2009
Philipp Gampe wrote:
> Am 05.09.2009, 00:10 Uhr, schrieb Nesto <facckerr at alibaba.yo>:
>
>> Hi. This is my TS code:
>>
>> catUID = TEXT
>> catUID.value = {register:newsCategoryUid}
>> catUID.insertData = 1
>>
>> So, i'm getting news category UID and storing it in catUID var. Now,
>> what i
>> want to do is this:
>>
>> if ($catUID = 1) $PID = 20;
>> if ($catUID = 2) $PID = 24;
>> if ($catUID = 3) $PID = 26;
>> ...... etc....
>>
>> Basicly i need to map those catUIDs to PIDs. Is this possible to do?
>>
>> Thank you for help!
>
> TS is not PHP :)
>
> if you tell us what you are trying to archive, we can examine how to
> approach
> sometimes there is an easier way to do things one just would never
> think of :)
Yeah, but i suppose this should be possible with CASE or if TS functions.
However i'm not sure how to do it, so some example would be helpfull. And
what i try to do is this. I need to insert a link in a template, based on
news category currently displayed on a page, which will point to different
pages . So for example:
There is a page with sport news on it (sport category) and within it there
is a link Archive which should point to the Sport archive page. The problem
is that i use only 1 template for displaying each category so i have to
create link dinamicly based on news category.
I'm not sure if this is clear so maybe a little pic :-)
Sport page (Template1)
-----------------
sport news bla bla
sport news bla bla
sport news bla bla
Archive (this should point to Sport archive page)
Culture page (Template1)
------------------
culture news bla bla
culture news bla bla
culture news bla bla
Archive (this should point to Culture archive page)
etc...
Thx!
More information about the TYPO3-english
mailing list