S
S
semki0962019-06-02 10:53:04
Vue.js
semki096, 2019-06-02 10:53:04

Is it possible to create a component if twig is used to display products?

I display products in a twig loop. But the problem is that using vue - changes occur in all products, and I only need where the click is. We need to create a component. But is it possible in the way my products are displayed?

{% for k, product in currentproducts %}
                {% for k2, p in product.img %}
                    <img src="/images/product/{{ p.img_name }}">
                {% endfor %}
            </div>
        </div>
    {% endfor %}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly Chernyshev, 2019-06-02
@kayn23

The first thing that comes to mind is to render directly in vue

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question