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

Sightly Code

Avatar

Level 2

What will be the sightly code for <CQ:TEXT> . what will the sightly code for below code

<cq:text property="image/jcr:description" placeholder="" tagName="small"/>

5 Replies

Avatar

Level 7

This is an example for the placeholder: <section class="cq-placeholder" data-emptytext="Enter Title"/>

For the component you could use this <sly> ${properties.image.jcr:description @ content = 'text'} </sly> even if the default context is 'text'

Avatar

Level 2

Actually there is a table component in jsp with below code

  Table component

  Draws a HTML table

--%><%@include file="/libs/foundation/global.jsp"%><%
    String classicPlaceholder = "<img src=\"/libs/cq/ui/resources/0.gif\" class=\"cq-table-placeholder\" alt=\"\">";
    String placeholder = Placeholder.getDefaultPlaceholder(slingRequest, component, classicPlaceholder);
    %><cq:text property="tableData"
               escapeXml="false"
               placeholder="<%= placeholder %>"
    />

 

Need to convert in sightly so what will be the sightly code for above

Avatar

Level 7

you can use the below options depending on your need.

${richtext.text@ context='html'}

${richtext.text @ context='text'}

${richtext.text@ context='js'}

${richtext.text@ context='css'}

${richtext.text@ context='unsafe'} // allows everything

Avatar

Level 2

  Draws a HTML table

--%><%@include file="/libs/foundation/global.jsp"%><%
    String classicPlaceholder = "<img src=\"/libs/cq/ui/resources/0.gif\" class=\"cq-table-placeholder\" alt=\"\">";
    String placeholder = Placeholder.getDefaultPlaceholder(slingRequest, component, classicPlaceholder);
    %><cq:text property="tableData"
               escapeXml="false"
               placeholder="<%= placeholder %>"
    />

 

Need to convert in sightly so what will be the sightly code for above

Avatar

Level 7

Use Sightly helper class to construct a java object and use it to render the table. Below is one simple reference to build from.

http://adobeaemclub.com/access-osgi-ser%C2%ADvice-from-the-wcmuse-class-in-sightly