diff options
Diffstat (limited to 'addons/website/views/website_templates.xml')
| -rw-r--r-- | addons/website/views/website_templates.xml | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index 9ec0821635a..80fc63ced5d 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -128,6 +128,9 @@ <!-- Background now controlled by css configuration, using color combinations --> <attribute name="class" add="o_colored_level o_cc" remove="bg-light" separator=" "/> </xpath> + <xpath expr="//header//a[hasclass('navbar-brand')]" position="replace"> + <t t-call="website.placeholder_header_brand"/> + </xpath> <xpath expr="//header//div[@id='top_menu_collapse']" position="attributes"> <attribute name="class" separator=" " add="flex-grow-0"/> </xpath> @@ -211,12 +214,6 @@ </xpath> </template> -<template id="website_name" inherit_id="website.layout" name="Website Name" active="False"> - <xpath expr="//header//a[hasclass('navbar-brand')]" position="replace"> - <a class="navbar-brand" href="/">My Website</a> - </xpath> -</template> - <template id="brand_promotion" inherit_id="web.brand_promotion" name="Brand Promotion"> <xpath expr="//t[@t-call='web.brand_promotion_message']" position="replace"> <t t-call="web.brand_promotion_message"> @@ -290,17 +287,21 @@ </xpath> </template> -<template id="layout_logo_show" inherit_id="website.layout" name="Show Logo"> - <xpath expr="//header//a[hasclass('navbar-brand')]" position="replace"> - <a href="/" class="navbar-brand logo"> - <span t-field="website.logo" t-options="{'widget': 'image'}" role="img" t-att-aria-label="'Logo of %s' % website.name" t-att-title="website.name" /> +<template id="placeholder_header_brand" name="Placeholder Header Brand"> + <span id="o_fake_navbar_brand"/><!-- Need a fake element so that the menu is still placed correctly --> +</template> + +<template id="option_header_brand_logo" inherit_id="website.placeholder_header_brand" name="Header Brand Logo" active="True"> + <xpath expr="//*[@id='o_fake_navbar_brand']" position="replace"> + <a href="/" t-attf-class="navbar-brand logo #{_link_class}"> + <span t-field="website.logo" t-options="{'widget': 'image'}" role="img" t-att-aria-label="'Logo of %s' % website.name" t-att-title="website.name"/> </a> </xpath> </template> -<template id="header_logo_none" inherit_id="website.layout" name="No Logo" active="False"> - <xpath expr="//header//a[hasclass('navbar-brand')]" position="replace"> - <a href="/" class="navbar-brand d-none"/> +<template id="option_header_brand_name" inherit_id="website.placeholder_header_brand" name="Header Brand Name" active="False"> + <xpath expr="//*[@id='o_fake_navbar_brand']" position="replace"> + <a href="/" t-attf-class="navbar-brand #{_link_class}">My Website</a> </xpath> </template> |
