Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-8210

CMS - Support page templates to be json object

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: App CMS
    • Labels:
      None

      Description

      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"
                    }
                  }
                }
              }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mahsumdemir Mahsum Demir
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: