IMG_RESOURCE doesn't return anything

View: New views
2 Messages — Rating Filter:   Alert me  

IMG_RESOURCE doesn't return anything

by Katja Lampela :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I found - and try to use - this code to produce a dynamic background
image out of the page properties media field.

    marks.topimage = IMG_RESOURCE
    marks.topimage {
# Default image if no image is inserted on the page
     file = fileadmin/img/myphoto.jpg
     file.import.data = levelmedia: -1, "slide"
# Folder to upload the userdefined images to
     file.import = fileadmin/img/
     file.import.listNum = 0
     file.import.override.field = media
     }

and in the html template I have the div style:
background-image:url(###topimage###)

But there is no reference to the image that is saved in page properties
media field. The outcome is:
background-image:url()

..So what am I doing wrong here? (TYPO3 4.2.10)

--
With kind regards

Katja Lampela
*Lieska-tuotanto
*www.lieska.net
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Re: IMG_RESOURCE doesn't return anything

by Katja Lampela :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi sorry, I got it! Has to be ofcourse

file.import = uploads/pics/

not
file.import = fileadmin/img/


Katja Lampela kirjoitti:

> Hi,
>
> I found - and try to use - this code to produce a dynamic background
> image out of the page properties media field.
>
>    marks.topimage = IMG_RESOURCE
>    marks.topimage {
> # Default image if no image is inserted on the page
>     file = fileadmin/img/myphoto.jpg
>     file.import.data = levelmedia: -1, "slide"
> # Folder to upload the userdefined images to
>     file.import = fileadmin/img/
>     file.import.listNum = 0
>     file.import.override.field = media
>     }
>
> and in the html template I have the div style:
> background-image:url(###topimage###)
>
> But there is no reference to the image that is saved in page properties
> media field. The outcome is:
> background-image:url()
>
> ..So what am I doing wrong here? (TYPO3 4.2.10)
>

--
  With kind regards

Katja Lampela
*Lieska-tuotanto
* www.lieska.net
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english