Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3180 มุมมอง

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Odoo 15:

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.พ. 25
1522
1
เม.ย. 24
1149
0
ส.ค. 18
6676
2
ก.ค. 25
1293
1
พ.ค. 25
817