Help - How to Edit / Alter Background Image on Each Page
Permalink
I want to be able to upload a background image for each page. I don't want to change the css for the background image, but be able to upload an image via the dashboard and then apply a specific image to a specific page. Each page in the website could potentially have a different background image.
Any ideas on how to do this would be greatly appreciated.
Thanks
Any ideas on how to do this would be greatly appreciated.
Thanks
I would imagine that this would best be delivered by modifying the current theme to look for a file attribute on a given page, then if one exist, to do some bit of logic to add the appropriate css. This would make it transparent to the end user, as they would simply pick a file from the file manager, just would require a tad bit of programming and setup to add the page attribute, and look for it in the theme.
This is the piece I can't figure out how to do. Any code examples would be greatly appreciated.
Well to add the image attribute option, you would simply use the page attributes section in the c5 dashboard (index.php/dashboard/pages/attributes/). This will allow you to then go to each pages properties, and set the custom attribute.
Then the programming bit. You should take a look at the advanced theme development page for this. It does a good job describing how to grab attributes, and you can also look at the file documentation for ideas on how to utilize the file once you have the file attribute.
http://www.concrete5.org/documentation/recorded-trainings/custom-te...
http://www.concrete5.org/documentation/developers/files/files-and-f...
Then the programming bit. You should take a look at the advanced theme development page for this. It does a good job describing how to grab attributes, and you can also look at the file documentation for ideas on how to utilize the file once you have the file attribute.
http://www.concrete5.org/documentation/recorded-trainings/custom-te...
http://www.concrete5.org/documentation/developers/files/files-and-f...