Rikard J
Hi
I have a problem with my snippets. They are rendered twice and default variables aren't passed. This goes for all of my snippets.
For example, I have made this snippet called "Button"
<a href="%url%" class="uk-button %class%"><span uk-icon="%icon%"> </span>%text%</a>
Is has four variables, three with default values (placed after | in the below list)
url | #
class | uk-button-primary
icon |
text | ...
For some reason the default values aren't passed to the rendered version. So in the front end this HTML is rendered:
<p><!-- START: Snippets -->
<a href="/" class="uk-button "><span uk-icon="" class="uk-icon"> </span></a>
<!-- END: Snippets --></p>
But that is not all, the snippet gets rendered twice, and along with it, all other content in that article. Adding more snippets to the same page does not make extra copies of the article. It happens only once regardsless of how many snippets I add to the page (I have only tested up to 5 snippets)
If I pass text to the variables these are used in the rendered view, but the problem with the duplicate content remains.
I have tried to make different snippets, but I get the same result with each one. Even snippets without variables.
I'm using:
Joomla 4.1.3
Snippets 8.3.1 [pro]
php 7.4.29
Any ideas on what I might be doing wrong?
Best regards,