Forum
href variable
I have built a portfolio with multiple items. There is always a preview image with a link to its full content. How can I set for each item an own link that is referred to its full content?
Here are my templates:
- Preview item with link:
<div class="portfolio-item">
<a href="#portfolio1">
<!-- image -->
</a>
</div>
Should link to:
<div id="portfolio1"> <!-- content --> </div>
Thanks a lot!
Is the question how to generate the
portfolio1
part?How to get a unique link for it. «portfolio1» stands for the first item. But I need a variable that every added item gets its unique id. The user should be free in adding as many items as he likes.
You can use perch_item_index. Look under Special Values on this page.
https://docs.grabaperch.com/docs/templates/attributes/id/
Ok, great it works! Many thanks for your support!