Christian Posted August 24, 2014 Share Posted August 24, 2014 Hi! Just currently using this on our proof of concept and on a hackaton. It's like ServicePage module but the difference is it return data without the need of extra programming (Image field for example). Also it only coded on the template. It primary used template URL segment to identify what page should be returned. All output is generated in JSON format. You can view it here. 4 Link to comment Share on other sites More sharing options...
jacmaes Posted December 9, 2014 Share Posted December 9, 2014 Christian, thanks a lot for this very useful template! The JSON output seems to skip my image field though. My field is named "imagenes", maximum files allowed is set to "0" (not limit), formatted value to "automatic", and the Inputield Type to "Image". Is there something that I need to change? Edit: I see that the function "getImageFieldInfo" only takes into account a single image. Edit 2: I've managed to get it to show various images by changing lines 175 to 178 to: foreach ($images as $key => $image) { $data['data'][$trim_field_name]['path'][$key] = $host . $url . $id . "/" . $image['data']; } (Note: I've removed the description field as I don't need it). 1 Link to comment Share on other sites More sharing options...
Christian Posted December 9, 2014 Author Share Posted December 9, 2014 Hi! Thanks for the heads up! Already updated! the template now support multiple images. 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