[TYPO3-english] tt_content title condition

Sergio Catalá Gil scatala at iti.upv.es
Mon Nov 2 12:04:52 CET 2009


>> Sergio Catalá Gil schrieb:
>>
>> if <the title of any tt_content displayed on the page is "Special">  
>> 	do some sentences on TS
>> else 
>> 	do other sentences on TS
>>
> You wont be able to use conditions for switching the rendering of content
> elements. conditions are handled at page-level, so no conditions get evaluated
> again during rendering of content elements.
>
> I answered a similar question some time ago:
> <http://lists.typo3.org/pipermail/typo3-english/2009-October/064397.html>
> Someone wanted to have different TypoScript setup, depending on the uid
> of a tt_content element. See my reply to the linked posting
>
>
>
>> Besides, is there any Global Wrap I can apply to every tt_content
>> element in every branch?
>
> Use the TYPOSCRIPT OBJECT BROWSER (!!!!).

Bernhard, thank you for your suggestion. It's very useful to me. I don't
control these data structures yet...

I finally took some advantage on the condition I wanted to get (my two
tt_content named "Special" and "NotSpecial" are links to tt_news
records):

tt_content = CASE
tt_content {
	key.field = header
	Special = RECORDS
	Special {
		source.field = records
		tables = tt_news
		conf.tt_news =< tt_news
		wrap = <ul class="special">|</ul>
	}
	NotSpecial = RECORDS
	NotSpecial {
		source.field = records
		tables = tt_news
		conf.tt_news =< tt_news
		wrap = <ul class="not-special">|</ul>
	}
}

The articles' titles are shown on the frontend but links are not
generated correctly. Any clue to display them fine? I think I have to
use "typolink" attribute but I'm not sure how. 

Sergio









More information about the TYPO3-english mailing list