So, I tried creating a JSON page but I cannot assign a page to the template as the template simply doesn't show up in the admin panel or is recognized when loaded otherwise...
General
JSON is not a template as such, rather a rendering method for API's. Any page with a corresponding .json-template, like blog.html.twig and blog.json.twig, can be access by appending .json to the end of the URL, to return it formatted as JSON.
Thus you do not create the page as JSON, but rather offer it in JSON as well.
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 2 | 308 | 3 weeks ago | ||
| 0 | 310 | 3 weeks ago | ||
| 0 | 263 | 4 weeks ago | ||
| 0 | 264 | 4 weeks ago | ||
| 2 | 335 | 1 month ago |