aem - currentStyle.<propertyName> is returning null in cq5 publisher, which is working perfectly fine in author -


i using sightly access design dialog properties component.

<span data-sly-test="${currentstyle.delimiter}">${currentstyle.delimiter}</span> 

but getting empty string.

i tried resolve issue trying out following.

  1. activating design node
  2. deleting page , creating new page.
  3. deleting components , dragging , dropping component again on page.
  4. i checked json output of currentdesign , values trying access available there.

you have 2 options

  1. in preview/ publish mode fetch design values via currentdesign.getjson(), parse value returned , key values want json object.
  2. you may solve removing 1 line of code template head.js. if inheriting template 1 of "/libs" ( sightly) page , there head.js having below line of code can overlay head.js in template , commented out below line of code.

if (wcmmode.disabled) { request.setattribute(packages.com.day.cq.wcm.api.components.componentcontext. bypass_component_handling_on_include_attribute, true); }

comment out , normal.


Comments