Files
design-themes/theme_test_custo/views/header.xml
T

46 lines
2.0 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Theme Header - Option -->
<template id="template_header_opt" inherit_id="website.snippet_options" name="Test Theme Custom Header Template - Option">
<xpath expr="//we-select[@data-variable='header-template']" position="inside">
<we-button title="Custom Theme"
data-customize-website-views="theme_test_custo.template_header_custom"
data-customize-website-variable="'custom-theme'"
data-img="/theme_test_custo/static/src/img/template_header_opt.svg"/>
</xpath>
</template>
<!-- Theme Header - Layout -->
<template id="template_header_custom" inherit_id="website.layout" name="Test Theme Custom Header Template">
<xpath expr="//header//nav" position="replace">
<nav data-name="Navbar" class="navbar navbar-expand-lg">
<div class="container">
<t t-call="website.placeholder_header_brand"/>
<t t-call="website.navbar_nav">
<!-- Menu -->
<t t-foreach="website.menu_id.child_id" t-as="submenu">
<t t-call="website.submenu">
<t t-set="item_class" t-valuef="nav-item"/>
<t t-set="link_class" t-valuef="nav-link"/>
</t>
</t>
<!-- Sign In -->
<t t-call="portal.placeholder_user_sign_in">
<t t-set="_item_class" t-valuef="nav-item"/>
<t t-set="_link_class" t-valuef="nav-link text-900"/>
</t>
<!-- User Dropdown -->
<t t-call="portal.user_dropdown">
<t t-set="_user_name" t-value="true"/>
<t t-set="_item_class" t-valuef="nav-item dropdown ml-auto"/>
<t t-set="_link_class" t-valuef="nav-link text-900"/>
</t>
</t>
</div>
</nav>
</xpath>
</template>
</odoo>