Skip to Content
Menu
This question has been flagged
1 Reply
5536 Views

Hello,


I am using Odoo Online for my website and am looking for which view I need to change the header  code, (HTML/CSS). I find multiple ones but cannot find exactly which one I have to modify.


 I find the website builder too limited for this purpose. Can anyone point me towards the right view ?

Thank you for your help.

Avatar
Discard
Best Answer

The sitewide header is made of multiple views. Depending of the template you picked, there are: the logo, title, cta btn, contact btn, submenu btn, languages(selector, flag, and more) and possibly more views. There are so many views that I can't list them all. 

Instead, I can tell you how I search and find them: I inspect the HTML source code of the page I want to edit (since you want the sitewide header, then any page will do), I decide around which html area I wanna edit, I pick words that seem unique and might lead me to the target view (Id name, classes, attributes, tags, etc), then I open the Views (settings > technical > user interface > views) type in the search box the words I picked and select the option "Search view arquitecture for:". This option searchs for all the content of each single view. Literal text (hardcoded) will be found, whereas text that comes from variables won't be found. If I don't find the object I'm looking for, it means it was rendered via some Qweb statement, thus is not hardcoded, then I try searching for the parent object or further up. Once I find the closest matching ancestor, I can see the qweb/python code that generated the child, and edit it.

It took me a while to learn how to find the corresponding views, but with trial and error you develop a sense of understanding of how Odoo is made and it becomes much easier to find them.

Good luck hunting and editing views!

Avatar
Discard
Related Posts Replies Views Activity
1
May 23
3240
1
May 25
355
2
Apr 25
481
0
Apr 25
440
2
May 25
428