[TYPO3] Sub-Templates?
Amir M.
amir219 at sbcglobal.net
Sat Jul 22 19:23:35 CEST 2006
JoH wrote:
>>If you have done it like this:
>><div class="header">...</div>
>>with
>>.header { background-image:url(myimage.jpg); }
>>you have no chance to replace the image with typo, except you use
>>different CSS-files.
>
>
> Well - actually there are some chances ;-)
> This is one of them:
> You can replace the CSS style dynamically in your header by using the
> IMG_RESOURCE element.
> There you can adress the background-image property and fill in your
> dynamically created images:
> Don't know the exact way of doing this in TV but the default typoscript
> would be something like this:
>
> page.headerData {
> 123 = IMG_RESOURCE
> 123 {
> file {
> import = uploads/media/
> import.data = levelmedia:-1, slide
> import.listNum = 0
> width = 456
> height = 123
> }
> stdWrap.required = 1
> stdWrap.wrap (
> <style>
> .header {
> background-image:url(|);
> }
> </style>
> }
> }
> }
>
> Replace 123 und 456 with the correct values for your image.
> Now you just have to upload the desired banner into the "media" field of the
> corresponding section's master page and it will be shown there and on any
> subpage of this master.
> Not tested but should be working.
>
> Joey
>
Interesting. It sounds simple, I will try this and hopefully it works.
But may I ask, where is the "media" field for a page? Sorry if this
is a noob question, but I've been looking and I can't find any such thing.
More information about the TYPO3-english
mailing list