[redesign] website routing system

This commit is contained in:
Rushabh Mehta
2016-06-23 18:25:50 +05:30
parent 2effad33d0
commit a334062b03
154 changed files with 768 additions and 802 deletions

View File

@@ -11,9 +11,7 @@ def get_context(context):
homepage = frappe.get_doc('Homepage')
for item in homepage.products:
parent_website_route, page_name = frappe.db.get_value('Item', item.item_code,
['parent_website_route', 'page_name'])
item.route = '/' + '/'.join(filter(None, [parent_website_route, page_name]))
item.route = '/' + frappe.db.get_value('Item', item.item_code, 'route')
# show atleast 3 products
if len(homepage.products) < 3: