[TYPO3-ttnews] How to make link from the teaser text

Oliver Rowlands oliver at liquidlight.co.uk
Sun Jan 13 14:33:43 CET 2008


Hi Gabor,

Try this in your template:

<!--###LINK_ITEM###-->###NEWS_SUBHEADER###<!--###LINK_ITEM###-->

This will work, though be aware that it is not technically (X)HTML 
compliant as the <a> element will be wrapping the <p> element which 
automatically wraps the sub-header field.

The only way around this would be to either disable the 
'tt_news.general_stdWrap' TS setup stdWrap (which will have a number of 
unwanted side effects) or to extend tt_news and overwrite the existing 
'NEWS_SUBHEADER' template marker.

Also make sure you create a local copy of the tt_news template instead 
of modifying the one provided in the tt_news source. This will avoid 
problems when upgrading tt_news. Simply copy the 
'tt_news_v2_template.html' to your 'fileadmin/templates/' directory then 
add the following TS constant in your root template:

plugin.tt_news.file.templateFile = 
fileadmin/templates/tt_news_v2_template.html

Hope this helps,

Best regards,

Oliver

> Hi!
> 
> I tried it, but it doesn't work me. I use the tt_news_v2_template.html sample 
> template as template file, the <!--###LINK_ITEM###--> is near the ###MORE### 
> marker. I deleted the <!-- --> and I put a link in a news record. But the 
> link doesn't appear.
> 
> I imagine so that if I don't have body, only teaser, in this case the more 
> don't appear. Of course in this case i have to put one link.
> 
> Could anyone help me?
> 
> Gabor


-- 
Oliver Rowlands
:: Liquid Light ::

E - oliver at liquidlight.co.uk
W - http://www.liquidlight.co.uk

T - 00 44 (0)845 6 58 88 35
F - 00 44 (0)845 6 58 44 35


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