Hi Everyone!
i´m new to cmsms and have a pretty basic question.
Is it possible to edit a background image of a template?
The problem is that i can hardly fix my layout without using a background image - but this image must be editable by editors ...
I´m coming from TYPO3 where this is not (really easy) possible.
Any help appreciated - i´m still in the progress of building my templates, which i have to have ready by tomorrow.
So long,
Michael
Editable background image
Re: Editable background image
I'm going to assume that you don't expect the editors be able to alter the actual image, but rather to specify which background image to use. That could get tricky (though I imagine that by saying so I'll be eliciting a few responses to the contrary!), but there are several simple ways to accomplish this.
It all comes down to templates. You could:
1) Build different templates that have different background images specified, allowing the editor to choose which will show up, or;
2) Code the template so that in pulls in a variable based on where you are in the site. The following code in your template (in conjunction with the CGSimpleSmarty Module) will assign a body class equal to the page alias of the section you are in:
From there, you simply style your css 'hang' on this code - ie:
I hope this points you in the right direction, or at least prompts some more targeted questions. If you have a link or example to post, please do - it'll help us answer your questions.
It all comes down to templates. You could:
1) Build different templates that have different background images specified, allowing the editor to choose which will show up, or;
2) Code the template so that in pulls in a variable based on where you are in the site. The following code in your template (in conjunction with the CGSimpleSmarty Module) will assign a body class equal to the page alias of the section you are in:
Code: Select all
{$cgsimple->get_root_alias('','root_alias')}
</__body class="{$root_alias}">
Code: Select all
.home body {background: #fff url(uploads/images/home_bkgd.gif) repeat-x center top;}
.about body {background: #fff url(uploads/images/about_bkgd.gif) repeat-x center top;}
etc.

