Best practice getting JSON for Property Editors saving content as Id (MNTP, Content and Media Picker - U7.2.4)
Hi guys!
We are building i site for a customer and for the first time using JSON/AngularJS for frontend. We have used the Tapas plugin to deliver JSON data for a proof-of-concept category page which is listing all items in a content folder and an element page displaying data about specific content element.
The content of A has among others to properties:
a multi mode tree Picker (MNTP) which allows the editor to link the document to a number of reusable documents of type B
a media picker (MP) which allows the editor to select an image to be shown on the category and element page
Now, using the Tapas plugin we quickly have faced the challenge of getting information about the items linked through the MNTP and MP. Both property editors save the links as node-/mediaIds on the CMSPropertyData table in the db and the JSON delivered of course just prints the id of the related content.
For now we have created two Angular scopes, one containing the A-documents and one containing the B-documents. And in order to get necessary information about the linked B-documents when listing information about for the A-documents, we do lookups in angular.
I have a feeling that we could see performance gains by doing this some other place, by making sure that the JSON-data for the A-documents included necessary information about the B-documents.
The story for images is the same: the A-document information include an id to the media-item, not the URL.
We are considering three options (last applies only to images):
Writing our own custom JSON
Modifying Tapas
get images async with f.ex Node2Json
I see that Node2Json has been tried for this purpose before but there doesn't seem to be a solution according to this discussion.
So our option seems to be 1 or 2. We would appreciate any feedback or pointers regarding what to investigate further or if anyone has had the same issues and found a best practice for this.
Best practice getting JSON for Property Editors saving content as Id (MNTP, Content and Media Picker - U7.2.4)
Hi guys!
We are building i site for a customer and for the first time using JSON/AngularJS for frontend. We have used the Tapas plugin to deliver JSON data for a proof-of-concept category page which is listing all items in a content folder and an element page displaying data about specific content element.
The content of A has among others to properties:
is working on a reply...