[TYPO3-english] plugin.tt_news.displayLatest.title_stdWrap.crop

Michael Miousse mmiousse at infoglobe.ca
Mon Mar 2 13:46:57 CET 2009


Le Thu, 26 Feb 2009 18:12:32 -0300, Paulo Miranda a écrit :

> Some days ago, I put a question on the TYPO3-english list: how to crop
> the title of specific tt_news plugin by TypoScript. As I got the
> solution by myself, I would like to share it just in case someone is
> looking for some hint.
> 
> A general solution is to use the script below:
> 
>    1.
> 
>       plugin.tt_news.displayLatest.title_stdWrap.crop = 100 | ...
> 
> The disavantage with this approach is in the case a page has more than
> one tt_news (LATEST) plugin, each of them needing specific croping, as
> it's my case.
> 
> The solution is to use the extension tt_news_marker. After its
> installation and configuration as explained here
> (http://typo3.org/documentation/document-library/extension-manuals/ttnews_marker/0.0.6/view/1/2/),
> it's necessary to add the marker ###MY_MARKER### in the html template.
> At last, add the script bellow in the Setup:
> 
> plugin.tt_news.extensions.ttnews_marker.marker {
>   my_marker {
>     field = title
>     wrap = <h1>|<h1>
>     crop = 65|...
>   }
> }
> 
> p.s.:
> 
>     * ###MY_MARKER### in uppercase
>     * my_marker in lowercase
>     * take off or comment the original ###NEWS_TITLE###
> 
> All the best,


Or you could simply use a typoscript object to have 2 distinct tt_news on your page

it would look like this:

plugin.tt_news.code >
plugin.tt_news.code = LATEST

lib.latest1 < plugin.tt_news
lib.latest1.displayLatest.title_stdWrap.crop = 100 | ...

lib.latest2 < plugin.tt_news
lib.latest2.displayLatest.title_stdWrap.crop = 100 | ...

the only disavantage of this solution is that you need to set your whole plugin by 
typoscript so you cant use a regular tt_content plugin

Cheer



More information about the TYPO3-english mailing list