Contexual Content Variables(CCVAR) configuration not working even for the OOTB properties. | Community
Skip to main content
Level 2
January 31, 2022

Contexual Content Variables(CCVAR) configuration not working even for the OOTB properties.

  • January 31, 2022
  • 1 reply
  • 2238 views

Hi,

 I have gone through the document  https://adobe-consulting-services.github.io/acs-aem-commons/features/contextual-content-variables/index.html

and followed every step as mentoned in the doc for the CCVAR. I followed HTML rewriting approach but still I am not able to even showcase the basic OOTB properties provided for CCVAR like ((page_properties.jcr:title)). Could someone please help me out here and let me know in case i am missing some configuration or any step that needs to be done before the configuration. As of now I am able to see my rewriter in Sling rewriter status and my ccvar configuration in web console config but still in my page I am not able to see any properties value. Any help will be much apprecaited. In case of more information on this please let me know.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

lukasz-m
Community Advisor
Community Advisor
February 19, 2022

Hi @sinshi1308, I was able to successfully configure Contextual Content Variables on clear AEM 6.5.11 using ACS Commons version 5.1.2. I have followed the instruction from page you are referring to. I did not made any additional steps. Could you please provide following information:

  1. AEM version you are using (including SP version)
  2. ACS Commons version you are using
  3. Content path where you expecting CCVAR to be applicable.
  4. You CCVAR configuration, including PropertyAggregatorServiceImpl and rewriter configuration
  5. Do you have any other customization on your AEM instance?
Level 2
February 19, 2022

Hi @lukasz-m 

Please find below the information:-

  1. AEM version you are using (including SP version) - AEM(6.5.11.0)
  2. ACS Commons version you are using - 5.1.0
  3. Content path where you expecting CCVAR to be applicable.- /content/tda/retail/dbs
  4. You CCVAR configuration, including PropertyAggregatorServiceImpl and rewriter configuration 

     

     

    I have deployed a blank OSGi configuration file from my project deployment. /apps/dbs/config/com.adobe.acs.commons.ccvar.impl.PropertyAggregatorServiceImpl.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
      jcr:primaryType="sling:OsgiConfig"/>
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml version="1.0" encoding="UTF-8"?>
    <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
              jcr:primaryType="nt:unstructured"
              contentTypes="[text/html]"
              enabled="{Boolean}true"
              generatorType="htmlparser"
              order="0"
              paths="[/content/tda/retail/dbs]"
              serializerType="htmlwriter"
              transformerTypes="[ccvar-transformer]">
        <generator-htmlparser
            jcr:primaryType="nt:unstructured"
            includeTags="[A,/A,DIV,/DIV,SPAN,/SPAN,P,/P,SECTION,/SECTION,H1,/H1,H2,/H2,H3,/H3,H4,/H4,H5,/H5,LI,/LI,BUTTON,/BUTTON]"/>
    </jcr:root>
  5. Do you have any other customization on your AEM instance? - No
lukasz-m
Community Advisor
Community Advisor
February 19, 2022

@sinshi1308, thanks for sharing the details. In general it looks fine, you should remove duplicated

<?xml version="1.0" encoding="UTF-8"?>

from your rewriter configuration. Nevertheless I was able to use your configuration successfully on ACS Commons 5.1.0.

Could you please share screen shot of crx tree that will present location of your PropertyAggregatorServiceImpl and rewriter. Ideally it should present expanded /apps tree that will include path to place where you are storing your xmls with OSGi and rewriter configuration.

This is how it looks on my local instance.