Hello,
I have followed the tutorial Modern Template and now I'm trying to modify this website a little. Among other things I want to add a background image to the BODY of the page. I just can't figure out where to do that.
I have tried changing the stylesheet that the template html file is using. Nothing happened. I tried to add the background to the html template itself - inside the BODY tag. This didn't work either. Then I saw in the tutorial "Get started" by Kasper skråhøj that I should be able to do it in the backend template -> rootpage -> constant editor. I cant find anywhere in the constant editor to do this.
Can anybody please help me solve the issue?
(answer in German is also fine).
if your page is defined in this way:
page = PAGE
page.typeNum = 0
then try something like this
page.bodyTag (
<body bgcolor=#ffffff leftmargin="0" rightmargin="0" topmargin="0" marginwidth="0" marginheight="0"
style="background-image:url(fileadmin/yourfolder/backgroundimage.jpg);">
)
you shouldn´t define the body in the html-template itself.
I did it like this...and it is working. Is there any "bad" design in this instead of using the style attribute as you suggest.
page.bodyTag = <body background="fileadmin/template/main/images/tapet1.gif">
Anyway, thanks for your help
Is there any "bad" design in this instead of using the style attribute as you suggest.
using the brackets is the only possibility to write your code with linebreaks in your ts-template. that´s the only difference.
hi!
if you set the pagetype of your rootpage to advanced, you can use media (files) to display a backgroundimage
page = PAGE
page.typeNum = 0
temp.myBGImage = IMAGE
temp.myBGImage {
import.data = levelmedia: 0, slide
import = uploads/media/
import.listNum = 0
}
page.bgImg < temp.myBGImage
page.bodyTagMargins = 0
...will set the first uploaded image of the rootpage to your backgroundimage
cheers
hannes
thomaslp schriebI did it like this...and it is working. Is there any "bad" design in this instead of using the style attribute as you suggest.
The background attribute is marked as deprecated by the W3C. It wont be part of any future version of (X)HTML and using the styles attribute is recommended.
Besides this it will work with all browsers in quirks mode.
CU
maxhb