Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Столбцы меню Opencart


bodyak0
 Share

Recommended Posts

Добрый гдень, имеется гдефолтное меню, при редактировании категории я указываю к примеру отображение в 2 или 3 столбца, мне требуется для блоков которые гделятся через столбец добавлять какой то игдентификатор или класс, чтобы я мог отгдельно задать ему свой стиль.
Для категории ггде нет разбивки на столбец синдартный класс, а им ггде указано люпотому чтой отличающийся от обычного.
 

    <ul class="nav navbar-nav">
        {% for category in categories %}
        {% if category.children %}
        <li class="dropdown"><a href="{{ category.href }}" class="dropdown-toggle" data-toggle="dropdown">{{ category.name }}</a>
          <div class="dropdown-menu">
            <div class="dropdown-inner"> {% for children in category.children|batch(category.children|length / category.column|round(1, 'ceil')) %}
              <ul class="list-unstyled">
                {% for child in children %}
                <li><a href="{{ child.href }}">{{ child.name }}</a></li>
                {% endfor %}
              </ul>
              {% endfor %}</div>
            <a href="{{ category.href }}" class="see-all">{{ text_all }} {{ category.name }}</a> </div>
        </li>
        {% else %}
        <li><a href="{{ category.href }}">{{ category.name }}</a></li>
        {% endif %}
        {% endfor %}
      </ul>

 

Link to comment
Share on other sites


Ну или какое то правило через else для колонок если они указаны

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.