From 9cda7e59a23ee24f2543cf61b86694430d579c9b Mon Sep 17 00:00:00 2001 From: Tarun Bhardwaj Date: Mon, 25 May 2015 10:09:48 +0530 Subject: [PATCH] Check for homepage_menus before iterate --- templates/webshop/home.jinja | 42 +++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/templates/webshop/home.jinja b/templates/webshop/home.jinja index f918ced..64a5cec 100644 --- a/templates/webshop/home.jinja +++ b/templates/webshop/home.jinja @@ -60,29 +60,31 @@
{% 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 %} -
-

{{ child_menu.title }}

-
-
-
- {% for child in child_menu.children %} -
- - {{ child.title }} - + {% if homepage_menus %} + {% for child_menu in homepage_menus %} +
+

{{ child_menu.title }}

+
+
+
+ {% for child in child_menu.children %} +
+ + {{ child.title }} + +
+ {% endfor %} +
+
+ +
- {% endfor %} -
-
- -
-
- {% endfor %} + {% endfor %} + {% endif %}