2

I want to create a new checkout/payment template which has a different layout than the whole site. For example, it has a header navigation bar with the logo in the center, a centered fullwidth checkout wizard, etc... The problem is, I want to reuse the "website.layout" template so that I can use other built-in features of Odoo.

Currently, I achieve that by creating a new template inside my module based on "web.layout" instead of "website.layout". But it doesn't feel right to me. Because I can't, as I said above, use built-in features of Odoo such a site builder, web editor, ... I wonder if there are any ways to replace the built-in header and footer inside <t t-call.. block.

Trung Tran
  • 319
  • 3
  • 13

1 Answers1

1

Try to replace header and footer using xpath expression and add your code inside that xpath expression for custom header and footer. please refer this link for example

<template id="web_external_layout_inherited" 
      inherit_id="web.external_layout_standard" customize_show="True">
<xpath expr="//div[@class='header']" position="replace">
       your code.
</xpath></template>

you can also add custom header and footer in qweb.

Thayif kabir
  • 715
  • 5
  • 20