GetSimple Support Forum

Full Version: background image change from admin panel
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi please excuse me if this is a silly question, I'm quite new hence this.

I have a simple 5 page site made in get-simple having an image banner in each. The image in the banner is put in as a background image of the banner dic in the css and is different for each page. But i would like to add a feature to change the image from the admin panel without having to edit the css directly. What should be my ideal method of action? Any help in pointing the direction appreciated.
Thanks
Simplest solution is to add this banner as a normal img inside page content, and position it respectively along with page content.
You can also make use of customfields plugin, add a special field for your image and add a call to this field inside your template file.
Last quite easy way of doing it, is a hardcoded path to image inside template file.
Just place an img tag inside template pointing to image located in for example data/uploads/banners, name the image the same as page slug, and call <?php get_page_slug(); ?>.jpg
(2013-06-05, 20:01:26)yojoe Wrote: [ -> ]Simplest solution is to add this banner as a normal img inside page content, and position it respectively along with page content.
You can also make use of customfields plugin, add a special field for your image and add a call to this field inside your template file.
Last quite easy way of doing it, is a hardcoded path to image inside template file.
Just place an img tag inside template pointing to image located in for example data/uploads/banners, name the image the same as page slug, and call <?php get_page_slug(); ?>.jpg

Thank You for the suggestion. I went ahead with custom field. Smile