[TYPO3-english] Control tt_news image size by TemplaVoila, LOAD_REGISTER?

Dmitry Dulepov dmitry at typo3.org
Fri Feb 27 11:39:16 CET 2009


Hi!

Lukas Mattsson wrote:
> I'm developing a news site, where the front page has multiple instances
> of tt_news in different content elements (columns). The columns differs
> in width. I use excludeAlreadyDisplayedNews to ensure the same news
> article isn't displayed twice. A single article might be displayed in a
> wide or a narrow column depending on the number of newer articles.
> 
> I've heard that I have to use LOAD_REGISTER in such circumstances, but
> can I solve it with a TS constant somehow?

I think you do not need a register there at all. You need to set plugin.tt_news.displayLatest.image.file.maxW for each tt_news instance in TS. That's it.

For example, your setup can look like:
==================
# Value for tt_news inserted as a content element
plugin.tt_news.displayLatest.image.file.maxW = 494

# Value for the tt_news inserted as TS object in the narrow column
lib.news_in_narrow_column < plugin.tt_news
lib.news_in_narrow_column.displayLatest.image.file.maxW = 150

# Value for the tt_news inserted as TS object in the wide column
lib.news_in_wide_column < plugin.tt_news
lib.news_in_wide_column.displayLatest.image.file.maxW = 200
==================

This way each news block on the page gets its own width. Is this what you were looking for?

-- 
Dmitry Dulepov
TYPO3 core team
http://dmitry-dulepov.com/
"Sometimes they go bad. No one knows why" (Cameron, TSCC, "Dungeons&Dragons")


More information about the TYPO3-english mailing list