Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3149 Visualizzazioni

Since two days i've been struggling to get the variables out from the web_editor .
How can i detect the variable settled from this customized toggle switch.

<template id="show_topbar_search" customize_show="True" inherit_id="xxx.set_topbar_container" name="Show Search in topbar" priority="10">
<xpath expr="//header//div[hasclass('fixed_topnav')]//div[hasclass('container')]" position="inside">
<div class="searchbar">
<div class="container">
<div class="holder">
<label>
<input type="text" name="search" placeholder="Find and search" class="search-field" /> <button class="fa fa-search search-button"></button>
</label>
</div>
</div>
</div>
</xpath>
</template>

Is it callable like t-if="show_topbar_search" and t-if="not show_topbar_search", or am i missing something.

Any help would be appreciated.

Best regards

Avatar
Abbandona
Risposta migliore

Odoo 15:

t-if="request.website.is_view_active('xxx.show_topbar_search')"

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
feb 25
1464
1
apr 24
1116
0
ago 18
6637
2
lug 25
1272
1
mag 25
789