Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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