[IMP] website: allow to set custom class on body in frontend layout
Purpose: allow <body> to accept other classes rather than just the 'o_connected_user' one. It is useful notably to tweak the display of some pages without breaking themes. Linked to task 1958372 Related to PR #32648
This commit is contained in:
committed by
Thibault Delavallée
parent
8815f9744c
commit
e59c034bf5
@@ -3,7 +3,7 @@
|
||||
<!-- Front-end/Back-end integration -->
|
||||
<template id="user_navbar" inherit_id="website.layout">
|
||||
<xpath expr="//t[@t-set='html_data']" position="after">
|
||||
<t t-set="body_classname" t-value="'o_connected_user' if env['ir.ui.view'].user_has_groups('base.group_user') else None"/>
|
||||
<t t-set="body_classname" t-value="(body_classname if body_classname else '') + (' o_connected_user' if env['ir.ui.view'].user_has_groups('base.group_user') else '')"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='wrapwrap']" position="before">
|
||||
<nav groups="base.group_user" t-if="website and menu_data" id="oe_main_menu_navbar" class="o_main_navbar">
|
||||
|
||||
Reference in New Issue
Block a user