[FIX] website: submenu without url

This is not impossible to have a submenu without URL.
The condition to set the menu item as active or not
must therefore take that into account.

opw-652688
This commit is contained in:
Denis Ledoux 2015-10-23 11:09:40 +02:00
parent 8c4877ff0d
commit f2bc45f91f
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@
</li>
<li t-if="submenu.child_id" t-attf-class="dropdown #{
(submenu.url and submenu.url != '/' and any([request.httprequest.path == child.url.replace('/page/website.', '/page/') for child in submenu.child_id]) or
request.httprequest.path == submenu.url.replace('/page/website.', '/page/')) and 'active'
(submenu.url and request.httprequest.path == submenu.url.replace('/page/website.', '/page/'))) and 'active'
}">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<span t-field="submenu.name"/> <span class="caret" t-ignore="true"></span>