[TYPO3-english] Condition mapping values
Nesto
facckerr at alibaba.yo
Sat Sep 5 21:31:01 CEST 2009
Philipp Gampe wrote:
> I see...
>
> I would do the following as a work around:
>
> lib.news < plugin.tt_news
> lib.news {
> # put your setup here
> }
>
> page.10.content = COA
> page.10.content {
> 10 < lib.news
> 10.archiveLink = xxx
>
> 20 < lib.news
> 20.archiveLink = yyy
> }
>
> This is just a rough sketch, but you'll get the point
>
> I am not sure how you would get the cat id within TS. Maybe you can
> use a register. There might be one ( I have a shadow of a memory
> about such :) ). You should read the section about registers in
> official doc ... I don't know how to use them either, but it should
> work somehow like this temp.news := register:tt_news_cat
Philipp,
I wrote that in the first post :-) This is the code for getting news
category ID:
catUID = TEXT
catUID.value = {register:newsCategoryUid}
catUID.insertData = 1
but now i need to map catUID to some page id (i know this PIDs) so for
example:
if ($catUID = 1) $myPID = 20;
if ($catUID = 2) $myPID = 56;
etc...
i think this can be done with if TS condition but i'm not sure how :-(
Documentation for this is not very helpfull. When i have right value in a
myPID variable it's easy to make a link in a template like this:
<a href="someurl/index.php?id=###PID###">Archive link</a>
Thx.
More information about the TYPO3-english
mailing list