0

My project now contain many twig and vue file, and I want to add a footer in every page.

Every twig file will {% extends '_base/index.twig' %} so I want to include footer.twig in index.twig so that every page will display footer by just including it one time only.

My problem is I want to include my twig inside an existing div "body_show" in vue but I cant do it.The approach I am using now will create a new div instead of including it inside the existing div.

How can I include footer.twig in <div id="body_show" class="box_l"> in vue?

home.vue:

<template>
<div id="body_show" class="box_l">

</div>
</template>

index.twig:

 <div id="main-wrapper" class="container-fluid">
   <div id="content-wrapper" class="row">
     {% block  body_show %}
       {% include '_base/footer.twig' %}
     {% endblock %}
   </div>
</div>

home.twig:

{% extends '_base/index.twig' %}

{% block body_show %}
    {% include '_base/footer.twig' %}
{% endblock %}

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.