Skip to content
Snippets Groups Projects
Commit e59c034b authored by sri-odoo's avatar sri-odoo Committed by Thibault Delavallée
Browse files

[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
parent 8815f974
No related branches found
No related tags found
No related merge requests found
......@@ -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">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment