Using {{forloop.index}} instead of {{post.modal-id}} here:
|
<a href="#portfolioModal{{ post.modal-id }}" class="portfolio-link" data-toggle="modal"> |
and here:
|
<div class="portfolio-modal modal fade" id="portfolioModal{{ post.modal-id }}" tabindex="-1" role="dialog" aria-hidden="true"> |
Will eliminate the need for set and track modal-id properties in every post that is created.