SamC Posted November 30, 2016 Share Posted November 30, 2016 Hi, I needed a way to insert images into the RTE so I created a template (no file) called site-images and added a field to that called siteImages which is an image field with unlimited uploads (set to 0). The idea is that when in my body field, a user can click on the image icon and insert an image. So the popup happens and I am given the choice of the current image on the page (from mainImage field) and a 'select from page'. This is where I can select my 'Site images' page which was created with the site-images template. Basically, is there a way to set this page as the default option here? It's not very intuitive at the moment. Please see screenshot for example of what I'm talking about. Thanks in advance. Link to comment Share on other sites More sharing options...
adrian Posted November 30, 2016 Share Posted November 30, 2016 Take a look at this gist: https://gist.github.com/adrianbj/437e3945e9d774f5a67e Also, this thread: You may also want to consider these modules: http://modules.processwire.com/modules/media-library/ https://processwireshop.pw/plugins/media-manager/ 3 Link to comment Share on other sites More sharing options...
SamC Posted November 30, 2016 Author Share Posted November 30, 2016 2 hours ago, adrian said: Take a look at this gist: https://gist.github.com/adrianbj/437e3945e9d774f5a67e Also, this thread: You may also want to consider these modules: http://modules.processwire.com/modules/media-library/ https://processwireshop.pw/plugins/media-manager/ Thanks @adrian how do I try out your module from github? I'm only after something simple for starters. The paid module looks pretty good though too (but they'd have to spend £££), this site may have audio clips on it so managing could become tricky. It's a charity gig I'm doing for free (although building a new portfolio at the same time so I can get some self employed work again isn't altogether altruistic). Link to comment Share on other sites More sharing options...
adrian Posted November 30, 2016 Share Posted November 30, 2016 You can manually install it, like any other module - just copy the file into your site/modules/ directory, do a modules refresh and click install. You might want to check out @mr-fan' s version in that thread I linked to as I think he extended it to also work with file fields (not just image fields), which you will want for audio clips. 2 Link to comment Share on other sites More sharing options...
SamC Posted November 30, 2016 Author Share Posted November 30, 2016 21 minutes ago, adrian said: You can manually install it, like any other module - just copy the file into your site/modules/ directory, do a modules refresh and click install. You might want to check out @mr-fan' s version in that thread I linked to as I think he extended it to also work with file fields (not just image fields), which you will want for audio clips. Awesome thanks Link to comment Share on other sites More sharing options...
SamC Posted November 30, 2016 Author Share Posted November 30, 2016 Hmmm, not working for me. I uploaded and installed module, set the root parent, but when I go to insert image via RTE, still defaults to the current page under 'If you would like to select images from another page, select the page below'. Not sure what I'm doing wrong here? Link to comment Share on other sites More sharing options...
SamC Posted November 30, 2016 Author Share Posted November 30, 2016 Scratch that idea. I added a 2nd field for body images with unlimited uploads. Then when inserting via RTE the images just insert to this 2nd field. Seems more intuitive to me. I don't really need to select from other pages when I think about it. Admin for a basic page looks like: Title Main image Summary (RTE limited formatting options) Additional images (for body content) Body content (RTE full formatting options) Works great, another +1 for processwire in my book. 1 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