Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Enabling targeting in parsys

Avatar

Level 5

I'm trying to enable targeting of components in a page. Our page has two parsys which are different components. One is allowing components to be targeted the other is not. If i put component X in parsys A then I can target, if i move to parsys B then I can not. I can't work out why! What controls if components can be targeted in a parsys?

1 Accepted Solution

Avatar

Correct answer by
Level 4

Which version of AEM you are using? In general, both in Classic and Touch UI whether or not targeting is enabled is basically defined at the component level (In the context menu of a component). However, In Touch UI, you could also manage targeting using Targeting Mode. But, In your current implementation, if you are able to target a given component in Parsys A but not in Parsys B, one possibility could be Parsys B is customized and it could be have been disabled globally for Parsys B.

For instance, if you have a customization for the parsys, you could set a global level so that all the components belonging to the customized parsys will not have an option for targeting. So, please check whether the parsys is customized in your scenario.

/apps/foundation/components/parsys

{

    "jcr:title":"My custom Paragraph System",

    "sling:resourceSuperType":"/libs/foundation/components/parsys",

    "componentGroup":".hidden",

    "cq:isContainer":"true",

    "jcr:primaryType":"cq:Component",

    "cq:childEditConfig": {

        "cq:disableTargeting": true,

        "jcr:primaryType": "cq:EditConfig"

    },

    "cq:editConfig": {

        "cq:disableTargeting": true,

        "jcr:primaryType": "cq:EditConfig"

    }

}

Also, if your requirement is to disable targeting across your site/implementation, then one solution i could think of is overlaying the given JS file(from libs to apps) and set the following config.

/apps/cq/ui/widgets/source/widgets/wcm/EditBase.js

config.disableTargeting = true;

Hope this helps.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 4

Which version of AEM you are using? In general, both in Classic and Touch UI whether or not targeting is enabled is basically defined at the component level (In the context menu of a component). However, In Touch UI, you could also manage targeting using Targeting Mode. But, In your current implementation, if you are able to target a given component in Parsys A but not in Parsys B, one possibility could be Parsys B is customized and it could be have been disabled globally for Parsys B.

For instance, if you have a customization for the parsys, you could set a global level so that all the components belonging to the customized parsys will not have an option for targeting. So, please check whether the parsys is customized in your scenario.

/apps/foundation/components/parsys

{

    "jcr:title":"My custom Paragraph System",

    "sling:resourceSuperType":"/libs/foundation/components/parsys",

    "componentGroup":".hidden",

    "cq:isContainer":"true",

    "jcr:primaryType":"cq:Component",

    "cq:childEditConfig": {

        "cq:disableTargeting": true,

        "jcr:primaryType": "cq:EditConfig"

    },

    "cq:editConfig": {

        "cq:disableTargeting": true,

        "jcr:primaryType": "cq:EditConfig"

    }

}

Also, if your requirement is to disable targeting across your site/implementation, then one solution i could think of is overlaying the given JS file(from libs to apps) and set the following config.

/apps/cq/ui/widgets/source/widgets/wcm/EditBase.js

config.disableTargeting = true;

Hope this helps.