Questions tagged [json]

The tag has no usage guidance.

11 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
268 views

Getting related entries along with entry using the Element API plugin

I want to list all the related entries to the entry I am displaying using the Element API plugin. I have a channel called series and another called episodes, the episodes have a relationship with 1 ...
2
votes
0answers
178 views

JsonLD & Schema

What is the best way to use Json-LD schema in the templates for Craft 3? I would like to dynamically load parts of the info. I know about the SEOmatic plugin but looking for a way to do it on my own.
2
votes
0answers
692 views

Ordering Element API by Category and Title

I'm looking for a way to order the ElementAPI json array by category and title. I can only get one to work whether it's 'group' => 'stockistRegion.first().title' or 'order' => 'title' using the ...
1
vote
0answers
34 views

Prevent Redactor from stripping tags like <span>

Is there any possible way to prevent <span> tags from being stripped from a Redactor field? I've tried all I can using custom Redactor and HTMLPurifier configs to no avail. Basically what I'm ...
1
vote
0answers
17 views

Serializing assets field is returning a serialized criteria object, but how to return serialized data?

I'm saving a custom element that has content by field layout. When successfully saved, I return the object in the response. Now, most of the data is usable but the assets field is just a serialized ...
1
vote
0answers
93 views

Entries as JSON files?

I work with VUE CLI and I want to build a entry form. My first Idea to bind in the data was props. They work but i can't modify the data (because it's props :D). To correctly integrate the data, my ...
1
vote
0answers
138 views

Escaping rich text fields to json but keep html markup

I am trying to create an export from an old Craft2 site over to a new Craft3 site. The structure and fields are all different, so I figured the easiest way was to create a json file from my entries ...
1
vote
0answers
152 views

CSV/JSON data imported to dynamic table

I'm looking for a solution that will allow me to turn a CSV or JSON data file into a table on the front-end of a website. Ideally the data would be imported into the database and then output into a ...
1
vote
0answers
348 views

Twig json array error in javascript with barbs.js

I'm having issues with the following code every since I added barbs.js (a page transition library) to my site. Basically I have a js file that controls the transition and ajax. The following code ...
1
vote
0answers
126 views

How can i request image locations through elements api for an entry in section?

i have endpoint: 'news/<slug:{slug}>.json' i print out EntryModel-Class in transformer function and it doesn´t seem to contain any photos like how it is described in Element Api example loop at ...
0
votes
0answers
25 views

Rest Controller and API Rate Limits or how to set CSRF token invalid

Problem: I have a JSON endpoint and like to limit access to it. I.e. to prevent double submits on contact forms or brute force attempts. One solution that came to my mind was rate-limiting the ...