mirror of
https://github.com/odoo/documentation.git
synced 2025-12-13 16:09:11 +07:00
[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:
@@ -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 :
|
||||
|
||||
Reference in New Issue
Block a user