how to display something with condition in htl?

Avatar

Avatar

tahir1601

Avatar

tahir1601

tahir1601

07-05-2019

for example i have the below code to be displayed when certain criteria is true

<span class='breadcrumb-separator'>

<font style="vertical-align: inherit;">&gt;</font>

</span>

conditon is certain count is less than 3

if the count is greater than 3, i dont want the above &gt to be displayed

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Hemant_arora

Avatar

Hemant_arora

Hemant_arora

07-05-2019

Refer to the examples in the link below:

http://blogs.adobe.com/experiencedelivers/experience-management/htl-intro-part-1/

<div data-sly-test.author="${wcmmode.edit || wcmmode.design}">

  Show this to the author

</div>

<div data-sly-test="${!author}">

  Not in author mode anymore..

</div>

Answers (1)

Answers (1)

Avatar

Avatar

berliant

Employee

Avatar

berliant

Employee

berliant
Employee

07-05-2019

Just to add to the previous reply: official documentation for data-sly-test usage:

HTL Block Statements