Webrocker Posted August 14, 2016 Share Posted August 14, 2016 Hi, I'd like to use the images field for uploading of, surprise, images But, instead of having the images attached to the page with this image field, I'd rather have a new child-page for each image. So basically I'd use the images-field ease of use to upload a bunch of images, but have distinct "image"-pages for the storage of information for each image. my theoretical setup: - images-page (template with title and one images field) - image-page (template with title and one image field (max items:1), body field, additional fields....) I don't know where to look/hook - is it the "save" action of the "images-page"? Where would I put the logic/code needed -- is the ready.php the right place? I think the logic would be something like this: Foreach image in the "images" field, a new child-page of the "images-page" is created. The "image" field of that child-page gets the current image as a value, the image file's name is used as the title/name of that page. The "real" image-file needs to be moved from the "images-page"'s asset directory to the asset directory of that page. Save and repeat for the next image. Is this doable? cheers, Tom Link to comment Share on other sites More sharing options...
Robin S Posted August 14, 2016 Share Posted August 14, 2016 @mr-fan has made a module that does this: AutoImagePages 4 Link to comment Share on other sites More sharing options...
Webrocker Posted August 15, 2016 Author Share Posted August 15, 2016 The PW oekosystem never ceases to amaze me. Thx! 1 Link to comment Share on other sites More sharing options...
adrian Posted August 15, 2016 Share Posted August 15, 2016 Just for reference, here is the origins of that module: 4 Link to comment Share on other sites More sharing options...
mr-fan Posted August 16, 2016 Share Posted August 16, 2016 Adrian is right....my github account is only the host of the module...he is owner of the credits on this smart piece of code....;) But i haven't tested the module with 3.x version...since there are a lot of changes on the image handling....i don't know if it works. regards mr-fan 3 Link to comment Share on other sites More sharing options...
Webrocker Posted August 16, 2016 Author Share Posted August 16, 2016 8 hours ago, mr-fan said: Adrian is right....my github account is only the host of the module...he is owner of the credits on this smart piece of code....;) But i haven't tested the module with 3.x version...since there are a lot of changes on the image handling....i don't know if it works. regards mr-fan I have it working in the current 3.x version (3.0.30 devns), no problems or hick-ups so far. thanks for the module @adrian @mr-fan 5 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