R
R
rm root2020-08-16 00:05:02
Django
rm root, 2020-08-16 00:05:02

Django CMS, there is a piece of HTML in the include, how to include this piece twice on one page and to be able to change different content?

There is a template in the include/skver_cards folder

{% load cms_tags %}
{% load static %}
<div class="cards">
    <div class="card__item">
        <div class="card__top">
            {% placeholder 'card__top_c1' %}
        </div>
        <div class="card__foot">
            {% placeholder 'card__foot_c1' %}
        </div>
    </div>
   .........
</div>


I include this piece on one page twice,
is it possible somehow that one includes one content,
and the other another ????

it just turns out if I change something in the first one, then it changes in the second one, what can I do ???
{% include './include/cards.html' %}
<br><br>
{% include './include/cards.html' %}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-08-16
@rm_root

it is with include that you can change the context https://docs.djangoproject.com/en/3.1/ref/template...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question