[TYPO3-ttnews] Image heading in tt_news

Lina Wolf liste at linawolf.de
Mon Jul 12 20:45:42 CEST 2010


Hello Jan,

sometimes within tt_news you have no oppurtunity to replace certain output 
with a cObject.

What always works though is to use generic markers instead of the standart 
marker. (tt_news > 3.0)

Something similar I described here in German:

http://blog.marit.ag/2010/04/07/subheader-tt_news/

So something like

plugin.tt_news {

genericmarkers {

myheader = IMAGE

myheader {

titleText.field = title

altText.field = title

wrap = <span class="imhead">|</span>

file = GIFBUILDER

...

}

}

}

Then you replace the marker displaying the title with ###GENERIC_MYHEADER### 
Greetings Lina


"Jan Bednarik" <info at bednarik.org> schrieb im Newsbeitrag 
news:mailman.1.1278927395.15493.typo3-project-tt-news at lists.typo3.org...
> Hi folks,
>
> I've redefined lib.stdheader to generate image because of special font:
>
> lib.stdheader.10.15 = IMAGE
> lib.stdheader.10.15.titleText.field = header
> lib.stdheader.10.15.altText.field = header
> lib.stdheader.10.15.wrap = <span class="imhead">|</span>
> lib.stdheader.10.15.fontTag >
> lib.stdheader.10.15.file = GIFBUILDER
> lib.stdheader.10.15.file {
>   XY = [10.w]+5,30
>   backColor = #EAEAEA
>   10 = TEXT
>   10.text.current = 1
>   10.offset = 0,25
>   10.align = center
>   #10.niceText = 1
>   10.fontColor = #003145
>   10.fontFile = fileadmin/simcar/fonty/SuzukiPROHeadline.otf
>   10.fontSize = 20
> }
>
> and I would like the same for titles in news list.
>
> It was easy for single view:
>
> lib.newstitle = RECORDS
> lib.newstitle {
>     dontCheckPid = 1
>     tables = tt_news
>     source.data = GPvar:tx_ttnews|tt_news
>     conf.tt_news = TEXT
>     conf.tt_news.field = title
>     conf.tt_news.required = 1
> }
> plugin.tt_news.displaySingle.title_stdWrap.cObject < lib.stdheader.10
> plugin.tt_news.displaySingle.title_stdWrap.cObject {
> 10 {
> titleText.cObject < lib.newstitle
> altText.cObject < lib.newstitle
> file.10.text.cObject < lib.newstitle
> }
> }
>
> but I don't know how to do that for list view. I've tried stuff like this 
> (obviously, I don't understand "current" stuff much - any how-tos?):
>
> plugin.tt_news.displayList.title_stdWrap.cObject < lib.stdheader.15
> plugin.tt_news.displayList.title_stdWrap.current = 1
> plugin.tt_news.displayList.title_stdWrap.cObject {
> 10 {
> titleText.setContentToCurrent = 1
> altText.setContentToCurrent = 1
> file.10.text.setContentToCurrent = 1
> }
> }
>
> but that doesn't work (nothing is displayed).
>
> Any ideas?
>
> Thanks
>
> -- 
> Jan Bednarik
> www.bednarik.org - web about TYPO3 in czech 




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