A
A
Adik Izat2019-02-07 08:11:32
opencart
Adik Izat, 2019-02-07 08:11:32

How to sync twig files in template editor with website files?

Good afternoon, forum users!
Version opencart 3.0.3.1 I will
immediately start the problem without any introduction, since the question can be met by many people. Describing:
I have files in the template editor and in the site folder. For example: header.twig is both there and here.
Let's say I have a header.twig like this:

<ul class="header-menu">
        <li><a href="/" class="header-menu-link">Главная</a></li>
        <li><a href="/" class="header-menu-link">Каталог товаров</a></li>
        <li><a href="/" class="header-menu-link">Торты на заказ</a></li>
        <li><a href="/" class="header-menu-link">О нас</a></li>
        <li><a href="/" class="header-menu-link">Отзывы</a></li>
    </ul>

I change it to the following (let's say I removed two items):
<ul class="header-menu">
        <li><a href="/" class="header-menu-link">Каталог товаров</a></li>
        <li><a href="/" class="header-menu-link">Торты на заказ</a></li>
        <li><a href="/" class="header-menu-link">О нас</a></li>
 </ul>

I click "Save" in the template editor and everything has changed on the site. I open the template editor again and see the code:
<ul class="header-menu">
        <li><a href="/" class="header-menu-link">Главная</a></li>
        <li><a href="/" class="header-menu-link">Каталог товаров</a></li>
        <li><a href="/" class="header-menu-link">Торты на заказ</a></li>
        <li><a href="/" class="header-menu-link">О нас</a></li>
        <li><a href="/" class="header-menu-link">Отзывы</a></li>
    </ul>

, which is unloaded from the site folder.
I edit the header.twig file in the site folder:
<ul class="header-menu">
        <li><a href="/" class="header-menu-link">Каталог товаров</a></li>
        <li><a href="/" class="header-menu-link">Торты на заказ</a></li>
        <li><a href="/" class="header-menu-link">О нас</a></li>
 </ul>

I save and refresh the site page: nothing happens. In order for my edits on the site to be implemented, I need to edit the template file in the site folder (1), go to the template editor and find the desired template (2), click the save button (3). Is there any way to make the task easier? After every change in my IDE, I have to go into the template editor, which is very inconvenient. Like in other normal CMS, I wanted to change the files in the folder itself and immediately see the result. How to find and cut down this same editing handler?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question