Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
i want site owner to be able to change background-image of a div via cms. (i.e to be able to upload image as a div's background) right now my code lookes like this:
<body>
<cms:editable name='main_content'>
<div id="erti" style="background-image: url(<cms:show bg_picture />)"><a href="#ori"><span id="aqcia">ixilet aqcia</span></a></div>
</cms:editable>
</body>
</html>


all i see in admin panel is just a code inside "cms editable" tags. i dont see any options to upload image as a div's background.

Thanks
Hi :)

You'll need to define a separate type 'image' editable region for the background image.
Your revised code could now become -
Code: Select all
<div id="erti" style="background-image: url(<cms:editable name='bg_picture' type='image' />)">
    <cms:editable name='main_content'><a href="#ori"><span id="aqcia">ixilet aqcia</span></a></cms:editable>
</div>

Hope it helps.

P.S. Make sure to visit the modified template as super-admin for the changes to persist.
thanks, u are a savior of the day. :) works like a charm :)

btw i like your cms, and i appretiate all the hard work u have done to make such a good product.
You are welcome, @asanta.
And thank you very much for your kind words :)
4 posts Page 1 of 1