Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for homepage_menus before iterate #376

Merged
merged 1 commit into from
May 25, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions templates/webshop/home.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -60,29 +60,31 @@
<section class="products latest">
<div class="container">
{% set homepage_menus = request.nereid_website.homepage_menu and request.nereid_website.homepage_menu.get_menu_item(max_depth=3).children %}
{% for child_menu in homepage_menus %}
<div class="row section-spaces">
<h3 class="text-center mrt-0">{{ child_menu.title }}</h3>
<br>
<div class="col-md-12 product-data">
<div class="client-slider">
{% for child in child_menu.children %}
<div class="slide">
<a href="{{ child.link }}">
<img class="img img-responsive margin-auto"
src="{{ CDN + url_for('nereid.webshop.send_static_file', filename='images/no-image.jpg') }}"
alt="{{ child.title }}" title="{{ child.title }}">
</a>
{% if homepage_menus %}
{% for child_menu in homepage_menus %}
<div class="row section-spaces">
<h3 class="text-center mrt-0">{{ child_menu.title }}</h3>
<br>
<div class="col-md-12 product-data">
<div class="client-slider">
{% for child in child_menu.children %}
<div class="slide">
<a href="{{ child.link }}">
<img class="img img-responsive margin-auto"
src="{{ CDN + url_for('nereid.webshop.send_static_file', filename='images/no-image.jpg') }}"
alt="{{ child.title }}" title="{{ child.title }}">
</a>
</div>
{% endfor %}
</div>
<div class="bx-controls-direction">
<a class="bx-prev" href="#"></a>
<a class="bx-next" href="#"></a>
</div>
{% endfor %}
</div>
<div class="bx-controls-direction">
<a class="bx-prev" href="#"></a>
<a class="bx-next" href="#"></a>
</div>
</div>
</div>
{% endfor %}
{% endfor %}
{% endif %}
<br>
</div>
</section>
Expand Down