Expand my Community achievements bar.

Getting the CSP field in Sling Model

Avatar

Level 5

We need to get access to the "csp" value that is part of the cq tag written out on the author for a parsys component. e.g.

{

    "path": "/content/test/jcr:content/header/extendednavigationca/parsys/*",

    "slingPath": "/content/test/jcr:content/header/extendednavigationca/parsys/*.html",

    "type": "wcm/foundation/components/responsivegrid/new",

    "csp": "testpage|page/header|responsivegrid/extendednavigationcardwrapper|componentwrapper|responsivegrid/parsys|responsivegrid/new|newpar",

    "editConfig": {

      "actions": [

        CQ.wcm.EditBase.INSERT

      ],

      "disableTargeting": true

}

However at the moment I can not find a way to generate this value in our Parsys SlingModel. Any help here would be great! The closest I have come is finding by looking in the UberJar a class called Cell which seems like it might hold this value in the searchPath field. However I'm not sure if this is the correct class and even if it is, how to get a populated instance of it in my parsys Sling model.

0 Replies