[TYPO3-ttnews] default code and typo3 4.0

Rupert Germann rupi at gmx.li
Mon Apr 10 22:14:28 CEST 2006


Hi Susanne,

Susanne Moog wrote:
> Hello List,
> 
> I have a little problem with getting the following code work:
> 
> page.60 < plugin.tt_news
> 
> plugin.tt_news.code = LATEST
> 
> In fact, it seems as if I'm doing something wrong with that code
> statement, because I always get the message that I haven't defined a
> code. 

that's absolutely correct, because you define the code after you copied the
complete content of plugin.tt_news to the page.60 object. Every change you
make in the plugin.tt_news object afterwards will not affect the copy in
page.60.

you could either use:

page.60 =< plugin.tt_news
plugin.tt_news.code = LATEST

which makes a reference from plugin.tt_news to page.60
or you simply swap the order of the lines

plugin.tt_news.code = LATEST
page.60 < plugin.tt_news

or you manipulate the code in the copied object

page.60 < plugin.tt_news
page.60.code = LATEST

generally you should prefer the reference because then the complete
plugin.tt_news configuration array has only to be parsed once in TypoScript
(which saves memory and processing time)

greets
rupert





More information about the TYPO3-project-tt-news mailing list