コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

how to display something with condition in htl?

Avatar

Level 4

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

1 受け入れられたソリューション

Avatar

正解者
Level 9

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>

元の投稿で解決策を見る

2 返信

Avatar

正解者
Level 9

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>

Avatar

Employee

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

HTL Block Statements