Jump to content

WebServiceTemplate


Christian
 Share

Recommended Posts

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.

  • Like 4
Link to comment
Share on other sites

  • 3 months later...

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).

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...