Greg Lumley Posted October 13, 2022 Share Posted October 13, 2022 I'd appreciate a little guidance on reusing images for backgrounds across my site. I don't want to add the image as an upload per page, but use it from a media library. I know I could hard-code it, but that defeats the object of flexibility. This is, of course, for caching purposes. What would you do? Pardon the vagueness of my query, I'm just looking for a starting point at the moment. Thanks!! G Link to comment Share on other sites More sharing options...
Roych Posted October 13, 2022 Share Posted October 13, 2022 Hey, You could create settings page and make changes to all the pages at once. Something like admin settings. Read more here: https://processwire.com/talk/topic/17471-change-css-and-images-through-admin-custom-admin-page/?do=findComment&comment=153511 1 Link to comment Share on other sites More sharing options...
bernhard Posted October 13, 2022 Share Posted October 13, 2022 No readme yet but could do exactly what you need: Upload images in one central place and then pick one of them on the related page: https://github.com/baumrock/RockImagePicker If you have any questions or find issues let me know. If you find time to write some instructions / screenshots for the readme that would be great ? 4 Link to comment Share on other sites More sharing options...
monollonom Posted October 13, 2022 Share Posted October 13, 2022 There is also this module by @Robin S Lots of options to choose from ? (though @bernhard’s might be more suitable as it allows to select only one image) 2 Link to comment Share on other sites More sharing options...
bernhard Posted October 13, 2022 Share Posted October 13, 2022 Robin's module is more flexible but needs more setup. That's why I created my plug&play module. And the UI is a little different. 1 Link to comment Share on other sites More sharing options...
Greg Lumley Posted October 13, 2022 Author Share Posted October 13, 2022 This is just one of the things I love about PW, everyone is alway so helpful! Thank you. 4 Link to comment Share on other sites More sharing options...
DaveP Posted October 13, 2022 Share Posted October 13, 2022 There are always multiple ways to achieve your aims in PW. What I tend to do for content shared across multiple pages is add a tab to the Home page in the admin using a new 'Fieldset in Tab'. Take a look in the demo admin at fieldset_meta. This way you can add all sorts of shared content and have it grouped together, images, site name, phone number, anything really. If things still aren't apparent after looking at the demo, come back here and ask some more. Link to comment Share on other sites More sharing options...
virtualgadjo Posted October 16, 2022 Share Posted October 16, 2022 Hi, running quite often ibto that kind of situation i now use a solution that seems a little like @DaveP's one let say you need a gb img or the large image on top of each page i always create a default fields "page" with a no-file template (hidden page of course) then i create the bg_img image field that will be used in every template, including the default fields one and, for this field i use the default value feature provided by pw, guess, the default value is in... the default fields page ? this way, no need to fill this field for every page but if you need a specific image for some pages (something that happens quite often in real life ? ), easy peasy, just fill the field in those pages in case it may help have a nice day Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now