[TYPO3] TS code - based on tt_content uid (tt_news)
Kathryn Blair
artscoop at mail.arts.ubc.ca
Thu Jul 17 18:02:18 CEST 2008
Hi Darko,
I had the same problem earlier last month and Tyler Kraft graciously helped
me out with it. Here was his solution:
http://lists.netfielders.de/pipermail/typo3-english/2008-June/051083.html
So attempting with my limited TS experience to adapt that to what you need,
I'm thinking something like:
lib.news=CONTENT
lib.news.table = tt_content
#PID of the parent page for the content element you want:
lib.news.select.pidInList=1
#UID of content element you want:
lib.news.select.uidInList=67
# define the rendering for this news item
# ( this will then use the defualt rendering for news and the settings
from the individual extension instance )
lib.news.renderObj =< plugin.tt_news
# Now you can set tt_news typoscript on the lib.news.rederObj:
lib.news.renderObj.archiveTypoLink.parameter = 81
And for lib.news2:
lib.news2=CONTENT
lib.news2.table = tt_content
#PID of the parent page for the content element you want:
lib.news2.select.pidInList=3
#UID of content element you want:
lib.news.select.uidInList=74
# define the rendering for this news item
# ( this will then use the defualt rendering for news and the settings
from the individual extension instance )
lib.news2.renderObj =< plugin.tt_news
# Now you can set tt_news typoscript on the lib.news.rederObj:
lib.news2.renderObj.archiveTypoLink.parameter = 80
If any more experienced typoscripters notice that I've made a mistake,
please point it out, but I think this should give you what you need, Darko.
Also, I have used this to set different typoscript for news elements that
appear together on several pages (although I didn't set them as content
elements on the pages, I just set them up in the ts template, which is what
I think you're doing too, but correct me if I'm wrong ... ) in straight TS
-- don't have TV on the instance of Typo3 I'm working with.
Kath
-----Original Message-----
------------------------------
Message: 4
Date: Thu, 17 Jul 2008 08:23:29 +0200
From: "Darko Jr. Gonzalez" <jkokino at gmail.com>
Subject: Re: [TYPO3] TS code - based on tt_content uid (tt_news
related)
To: typo3-english at lists.netfielders.de
Message-ID:
<mailman.16087.1216275842.4573.typo3-english at lists.netfielders.de>
Content-Type: text/plain; charset=UTF-8
>> Please hint/help?
>>
>I afraid you cannot do it with TS. If you use TV, you can do it per "lib."
instance:
>
>lib.news < plugin.tt_news
>lib.news.archiveTypoLink.parameter = 81
>
>lib.news2 < plugin.tt_news
>lib.news2.archiveTypoLink.parameter = 80
>
>Next each of these objects should be connected to a field in TV as
"TypoScript Object Path".
I have get lib.news and lib.news2 from tt_content as such,
lib.news2 = RECORDS
lib.news2.tables = tt_content
lib.news2.source = 74
lib.news = RECORDS
lib.news.tables = tt_content
lib.news.source = 67
And then I set each to appear on specific pages, some of which are
intersecting (overlapping). The pages where these intersect (overlap) cause
the problem to be unable to define a separe archive link. Understand? I
define these 67 and 74 and specific sys folder which holds tt_content
elements which are called with "TypoScript Object Path" and I delegate which
page they appear on to.
I understand that I mix things here, but how do I define the archive link
per instance with TS?
lib.news2 < plugin.tt_news
lib.news2.archiveTypoLink.parameter = 80
lib.news2 is tt_content 74 and I have to call it to render it in the
frontend as a RECORDS and tell the table and source.
Am I mixing something here?
Please advise
Regards,
Darko
------------------------------
More information about the TYPO3-english
mailing list