-
Notifications
You must be signed in to change notification settings - Fork 12
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
Twig code in owl-carousel shortcode #27
Comments
The empty comes from the whitespace in your loop. tighten this up:[owl-carousel` items=1 margin=10 loop=false nav=true responsive={0:{items:1},600:{items:2},1000:{items:3}}]
{% for eintrag in news.filterBy({published: true}).limit(0, 10) -%}
<div class="text-xl">
{{ eintrag.titel|e}}
</div>
{%- endfor %}
[/owl-carousel] |
Thanks for your quick response. Unfortunately your solution does not work for me. Modify the Plugin-Template File like this solves the problem for me. But it seems more like a hack, than a solution. :)
|
Okay. I tested my previous solution and that worked for me. Thanks. Another question - maybe depending on this - is: How could i dynamically change this Shortcode line?
I goal is - depending on the number of items in the owl slider - to modify this line. If only one item is in the slider, the responsive part is not needed (and the one item is showed in full width. Do you have any idea how to do it? Many regards! |
If I pack twig code within an OWL element, an empty carousel element is created for each div container.
I grab flex objects and go over them in a for loop. There are three elements in the flex.
The HTML-Output looks like this:
I have no idea, where the
<p></p>
's come from. It looks like a bug.Many regards!
The text was updated successfully, but these errors were encountered: