Skip to content

Commit

Permalink
allow tag list to output links for tags that have url attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
wildone committed Jun 5, 2021
1 parent 6ab8117 commit 2ccb376
Showing 1 changed file with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
<template data-sly-template.field="${@ componentProperties}">
<div data-sly-test="${componentProperties.category}"
class="card-taglist">
<ul data-sly-list.tag="${componentProperties.category}"
class="taglist">
<li data-sly-test="${componentProperties.category[tag]}"
class="taglist__item"
id="${componentProperties.category[tag].value @ context='attribute'}">${componentProperties.category[tag].title @ context='text'}</li>
</ul>
</div>
<div data-sly-test="${componentProperties.category}"
class="card-taglist">
<ul data-sly-list.tag="${componentProperties.category}"
class="taglist">
<li data-sly-test="${componentProperties.category[tag] && componentProperties.category[tag].url == ''}"
class="taglist__item"
id="${componentProperties.category[tag].value @ context='attribute'}">${componentProperties.category[tag].title @ context='text'}</li>
<li data-sly-test="${componentProperties.category[tag] && componentProperties.category[tag].url != ''}"
class="taglist__item"
id="${componentProperties.category[tag].value @ context='attribute'}">
<a href="${componentProperties.category[tag].url @ context='attribute'}"
title="${componentProperties.category[tag].title @ context='attribute'}"
>${componentProperties.category[tag].title @ context='text'}</a>
</li>
</ul>
</div>
</template>

0 comments on commit 2ccb376

Please sign in to comment.