Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
5 Odpowiedzi
3185 Widoki

Hi

I want to add the search bar in the Header navigation on the top of the page. Why: because the header I can fix them to the top so this part of the website is always there. 

- Is there a way to that in the website builder?

- Do i need to create a own module, can someone some code?

- Is there a possibility to do that in Odoo Studio?


Best Regards

Marc

Awatar
Odrzuć
Najlepsza odpowiedź

Hello Marc Walter,

Hope you are doing well.

You can add search bar in the default header navigation by using below code.

Please find code in comment. 

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Awatar
Odrzuć

Please find code here :-

<template id="inherit_header_website" inherit_id="website.template_header_default">
<xpath expr="//t[@t-call='portal.user_dropdown']" position="before">
<li>
<t t-call="website.website_search_box_input">
<t t-set="_form_classes" t-valuef="o_wsale_products_searchbar_form o_not_editable p-2"/>
<t t-set="_classes" t-valuef=" "/>
<t t-set="search_type" t-valuef="search_type"/>
# For example: <t t-set="search_type" t-valuef="products"/>
<t t-set="action" t-value="'action url which values should be search'"/>
# For example: <t t-set="action" t-value="'/shop'"/>
</t>
</li>
</xpath>
</template>

Najlepsza odpowiedź

I had the same problem. Couldn't find a solution

Awatar
Odrzuć
Autor Najlepsza odpowiedź

I only found the possibilty to add it via one of the header templates but it's only possible to add the search above the menu. For me it's still open because and probably we need for that an own module.

Awatar
Odrzuć
Najlepsza odpowiedź

Hey guys, I was asking myself same question, but haven't solve it yet.. Did you two found the solution?

Awatar
Odrzuć
Najlepsza odpowiedź

I have the same question, using Odoo online V16.2

It's quite common on websites to have a search bar in the header of the website, but can't seem to figure out how to do this.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
cze 25
1385
2
mar 25
2755
3
gru 24
2407
1
paź 24
2381
0
sty 24
1458