-
Notifications
You must be signed in to change notification settings - Fork 204
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
Include div block, only in first particle instance (Twig, Joomla) #3150
Comments
I found a way to detect that the particle instance is the first one on the page:
Now the question to the connoisseurs is this the right way? And is there a better solution? |
So, I found a solution that suits me. And this solution is in the documentation:
This way, only one instance is loaded |
I create my particle. And there can be several particles on a page.
The particle must have a dynamic modal window. And the modal should be one per page, created by the first particle only. All other particles must work with the modal window created by the first particle.
It's possible to do this through JavaScript, but the question is, is it possible with twig to know the particle's instance number to prevent the modal block from being re-created?
The text was updated successfully, but these errors were encountered: