Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
6340 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
may 23
3576
5
ago 25
9772
2
jul 25
426
2
jul 25
942
4
jun 25
1057