-
Type:
New Feature
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: App CMS
-
Labels:None
Currently page templates only support escaped json strings but these strings are hard to change so I propose making page templates json objects.
For example, rather than writing:
"template": "{\r\n \"jcr:primaryType\": \"sling:Page\",\r\n \"jcr:content\": {\r\n \"jcr:primaryType\": \"nt:unstructured\",\r\n \"jcr:title\": \"title\",\r\n \"sling:template\": \"/conf/global/site/templates/base-page\",\r\n \"sling:resourceType\": \"reference/components/pages/base\",\r\n \"published\": false\r\n }\r\n}"
we will write:
"template": { "jcr:primaryType": "sling:Page", "jcr:content": { "jcr:primaryType": "nt:unstructured", "jcr:title": "{{title}}", "sling:template": "/conf/blog/site/templates/blog-post", "sling:resourceType": "blog/pages/blog-post", "published": false, "container": { "blog_post_header": { "sling:resourceType": "blog/components/blog-header" } } } }