[TYPO3-english] add style="background-image(); " with IMG_RESOURCE + LOAD_REGISTER?

Mark Roemermann mark at nasaustralia.com.au
Wed Aug 31 00:36:44 CEST 2011


Thanks guys for the suggestions.  Clearly I haven't had my zen moment 
with typoscript yet.  ;)

With Jigals idea I have got it working now.

-- MarkR

On 31/08/2011 1:02 AM, Jigal van Hemert wrote:
> Hi,
>
> On 30-8-2011 15:36, Mark Roemermann wrote:
>> Hi list, I've been banging my head against a wall with this. Is there a
>> way to create a H1 tag that takes a page title and subtitle, and adds a
>> style attribute that is pulled from the page media?
>>
>> eg:
>>
>> <h1 style="background: url(page:media)
>> no-repeat;>page:title<span>page:subtitle</span></h1>
>
> Not the prettiest solution (I don't like splitting paired HTML tags over
> two properties), but it works:
>
> 10 = TEXT
> 10 {
> data = page:title
> innerWrap = |<span>{page:subtitle}</span>
> innerWrap.insertData = 1
> preCObject = IMG_RESOURCE
> preCObject {
> file {
> import = uploads/media/
> import.data = page:media
> import.listNum = 0
> height = 200
> width = 600
> }
> stdWrap.wrap = <h1 style="background: url(|) no-repeat;">
> }
> postCObject = TEXT
> postCObject.value = </h1>
> }
>
>



More information about the TYPO3-english mailing list