AEM 6.5 & Sightly Condition with in list
Hello All,
We have a component which lists the child pages of configured root path and wanted to highlight current page if it is part of the list.
For example:
Configured root path = /content/mysite/home
the output component will be,
- Products
- Services
- Contact Us
Sightly code:
<sly data-sly-list.page="${model.PagesList}">
<li >
<a href="${ page.readMoreLink }.html"> ${ page.Title} </a>
</li>
</sly>
Now I want to add one additional style tag/class at anchor tag level , when page.Title = "Products" so that output will be something like below:
- Products
- Services
- Contact Us
can someone advise me how to add condition within anchor tag so that I can highlight based on comparison.
thanks in advance.