Skip to content

Commit

Permalink
Merge pull request #376 from tarunbhardwaj/develop
Browse files Browse the repository at this point in the history
Check for homepage_menus before iterate
  • Loading branch information
prakashpp committed May 25, 2015
2 parents 93147c4 + 9cda7e5 commit 7d4d79d
Showing 1 changed file with 22 additions and 20 deletions.
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

0 comments on commit 7d4d79d

Please sign in to comment.