[IMP] howto/website: Layout - Header/Footer templates

closes odoo/documentation#13570

X-original-commit: 3fded9a379
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Brandon Mercier (bram) <bram@odoo.com>
This commit is contained in:
Brandon Mercier
2025-05-27 07:06:56 +00:00
parent da0af2abef
commit c93e8f4211

View File

@@ -434,7 +434,8 @@ Custom
Create your own template and add it to the list.
.. important::
Don't forget that you may need to disable the active header template first.
Don't forget that you may need to disable the active header template first before enabling the
custom one.
**Option**
@@ -482,20 +483,13 @@ variables.
.. code-block:: xml
:caption: ``/website_airproof/views/website_templates.xml``
<record id="header" model="ir.ui.view">
<field name="name">Airproof Header</field>
<field name="type">qweb</field>
<field name="key">website_airproof.header</field>
<field name="inherit_id" ref="website.layout"/>
<field name="mode">extension</field>
<field name="arch" type="xml">
<xpath expr="//header//nav" position="replace">
<!-- Static Content -->
<!-- Components -->
<!-- Editable areas -->
</xpath>
</field>
</record>
<template id="header" inherit_id="website.layout" name="Airproof - Header" active="False">
<xpath expr="//header//nav" position="replace">
<!-- Static Content -->
<!-- Components -->
<!-- Editable areas -->
</xpath>
</template>
Don't forget to adapt the `template_header_mobile` accordingly to keep consistency between desktop
and mobile:
@@ -691,19 +685,12 @@ active footer template first.
.. code-block:: xml
:caption: ``/website_airproof/views/website_templates.xml``
<record id="footer" model="ir.ui.view">
<field name="name">Airproof Footer</field>
<field name="type">qweb</field>
<field name="key">website_airproof.footer</field>
<field name="inherit_id" ref="website.layout"/>
<field name="mode">extension</field>
<field name="arch" type="xml">
<xpath expr="//div[@id='footer']" position="replace">
<div id="footer" class="oe_structure oe_structure_solo" t-ignore="true" t-if="not no_footer">
<!-- Content -->
</div>
</xpath>
</field>
<template id="footer" inherit_id="website.layout" name="Airproof - Footer" active="False">
<xpath expr="//div[@id='footer']" position="replace">
<div id="footer" class="oe_structure oe_structure_solo" t-ignore="true" t-if="not no_footer">
<!-- Content -->
</div>
</xpath>
</record>
.. _website_themes/layout/copyright :