コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3154 ビュー

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')"

アバター
破棄
関連投稿 返信 ビュー 活動
0
2月 25
1465
1
4月 24
1117
0
8月 18
6639
2
7月 25
1277
1
5月 25
792