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

Adobe target related query

Avatar

Level 9

Hi All,

We are using AEM Version 6.0.0.SP2  and have our custom code integrated into my local instance and not integrated with Target, but still the target option shows on the components. We have a requirement wherein

1] If AEM is not integrated with Target, then the option should be grayed out.

2] If AEM is integrated with Target, then the option should be available and it should link to Adobe target.

I come from a support background and finding it difficult to find a fix for this. 

Some of the things tried/reference articles searched are as below :

a]  https://forums.adobe.com/message/5334713 talks about disabling the Target button[for 5.6 version].

b] http://wcmaem.blogspot.in/2014/01/how-to-disbale-target-option-on.html article speaks about disabling on a component by component basis, which does not help us as it needs to be done for each of the component.

Any thoughts on how the requriements[1 and 2] can be achieved, would be really helpful.

1 Accepted Solution

Avatar

Correct answer by
Employee

For any new components you create, you simply make sure they include the property: cq:disableTargeting="true" as part of your review process.

Scott's point about a tool/script was for adding this property to existing components, if you wanted you could add them to new components, but it is simpler to add the property when the component is being created.

Regards,

Opkar

View solution in original post

7 Replies

Avatar

Level 10

The link that you state in b seem to be the answer - you need to do this for any component for which you want to disable target. You need this prop:

 cq:disableTargeting="true" 

If you wan to automate this - you can always write a tool that is able to update AEM component using the JCR API to insert this property.  

Avatar

Level 9

Hi Scott,

Thank you for your reply.

But as per "b", this needs to be done explicitly for all the components and if there is a new component created, this will not work unless we run the tool.

Any other thoughts/pointers on this will be really helpful.

Avatar

Level 9

Hi All,

Any thoughts on the above will be really helpful.

Avatar

Correct answer by
Employee

For any new components you create, you simply make sure they include the property: cq:disableTargeting="true" as part of your review process.

Scott's point about a tool/script was for adding this property to existing components, if you wanted you could add them to new components, but it is simpler to add the property when the component is being created.

Regards,

Opkar

Avatar

Level 9

Hi Omkar,

Thanks a lot for your reply.

Few doubts as below :

1] The requirement says 

  a] If Target is integrated, then the option has to be available

  b] If target is not integrated, then option has to be grayed out.

2] But if we explicitly set property: cq:disableTargeting="true" on components, I guess property settings have to be again changed to  cq:disableTargeting="false" in the other case, correct?

3] This being the case, can you please let me know if there is any other approach we can take, so that both the requirements are met.

Avatar

Level 9

Hi All, 

Any thoughts on the above will be really helpful.

Avatar

Level 9


Hi All,

I am trying to follow the overlay method mentioned in the last paragraph of the article https://forums.adobe.com/message/5334713
We are using AEM Version 6.0.0.SP2. 

Steps done as below :

1] My apps folder did not have structure /apps/cq/ui/widgets/source/widgets/wcm/EditBase.js. So, created the same structure in apps and copied the EditBase.js file there.

2] Added "config.disableTargeting = true;" just below the line "addTargetingActions: function(items, ctrlDef, isTargeted, config) {".

3] But still Target continues to show up.

4] Also, read an article "Override an auto-created property" in https://docs.adobe.com/docs/en/aem/6-0/develop/platform/overlays.html. But not quite getting exactly as what needs to be done.Am I missing something here?

Any thoughts on this will be really helpful.