Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend just using forloop.index instead of requiring a modal-id property to be set for every post. #71

Open
georgeslabreche opened this issue Apr 4, 2018 · 2 comments

Comments

@georgeslabreche
Copy link

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.

@georgeslabreche
Copy link
Author

georgeslabreche commented Apr 4, 2018

Alternatively could just use {{ post.title | slugify }} instead of portfolioModal{{ post.modal-id }}, this would result in a SEO friendlier URL to share direct link to modal.

@y7kim
Copy link
Owner

y7kim commented Apr 4, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants