mirror of
https://github.com/bringout/oca-website.git
synced 2026-04-23 06:32:06 +02:00
28 lines
1 KiB
XML
28 lines
1 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
<template id="layout" name="Floating WhatsApp Icon" inherit_id="website.layout">
|
|
<xpath expr="//div[@id='wrapwrap']" position="after">
|
|
<t t-set="extra_info" t-value="''" />
|
|
<t
|
|
t-if="website.whatsapp_text"
|
|
t-set="extra_info"
|
|
t-value="website.whatsapp_text"
|
|
/>
|
|
<t
|
|
t-if="website.whatsapp_track_url"
|
|
t-set="extra_info"
|
|
t-value="website._get_track_url_message(request.httprequest.full_path)"
|
|
/><!-- %0A newline -->
|
|
<div t-if="website.whatsapp_number" class="whatsapp_icon">
|
|
<a
|
|
target="_blank"
|
|
t-attf-href="https://api.whatsapp.com/send?phone={{website.whatsapp_number}}&text={{extra_info}}"
|
|
title="WhatsApp Floating Icon"
|
|
>
|
|
<i class="fa fa-whatsapp" />
|
|
</a>
|
|
</div>
|
|
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|