Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

detailed web template inheritance for website themes

Odebírat

Get notified when there's activity on this post

This question has been flagged
webinheritancetemplatesthemewebsite_builder
1 Odpovědět
10142 Zobrazení
Avatar
Barry Smoke

I tip my hat off to the odoo documenation team.  There is quite a bit of documentation available, however there are some gaps that need filled in, especially for a newbie like me coming from a php background.  The biztech theme available for free helped me the most in figuring out how to modify, and use a basic bootstrap theme.

I have successfully created a theme, and installed it, and I have my homepage rendering to a custom bootstrap theme.  I think I've realized some limitations in the odoo xml theme framework.  I tried to do something simple, in my opinion, which is move the default navigation menu to a location under a parrallax header in the theme.  In php, and traditional cms, this wouldn't be a problem, since there are tags that allow you to place rendered content anywhere inside your theme.  odoo however uses template blocks, and there is not a master template file, that is used on every render(with variables inside for rendering content).

The closest thing is to override the default page layout, using a page definition, but there is not enough documentation of how the default page templates work.  You have to read the code, and there are obviously things I'm missing in the flow. 

I've tried doing a new homepage template using the page=True, and I had much greater control over how that page looked.  The problem with this approach, is the page editing was completely missing.  I could not figure out what t-call to do to include that.

xpath calls are only helpful on the website.layout, and don't help you on an inherited view.

For example, if I were to attempt to replace the existing header in the default layout with empty content, so I could move it later in the template flow, I would think the logical way would be an xpath search with replace.  this works for website.layout, but not if I just want the change on a single page.

<xpath expr="//div[@id='wrapwrap']/header" path is not found, if I use that inside a template, where inherit_id="website.homepage", but it works fine in website.layout.

So my next thought is to actually do this on website.layout, however use template variables to detect homepage.  how would I use a t-call="website.layout", but replace the resulting content based on a t-if homepage?



0
Avatar
Zrušit
Avatar
S. Edelman
Nejlepší odpověď

Hello!
I've been struggling with the same matter. I want lighter or even non-existing <header> (navigation mainly) on the front page. I've tried both using xpath like you but indeed do not know how to choose it then only for ONE website page instead of all, and also with using t-extend but no luck so far...

(here the "frontpage" is the view name you can see if you look with "customize theme".

<?xml version="1.0" encoding="utf-8"?>

<templates>

<t t-extend="website.layout">

<t t-if="website.frontpage">

<t t-jquery="header" t-operation="replace">

<header>

<div class="navbar navbar-default navbar-static-top">

<div class="container">

<div class="collapse navbar-collapse navbar-top-collapse">

<ul class="nav navbar-nav navbar-right" id="top_menu">

<li class="dropdown" t-ignore="true" t-if="website.user_id != user_id" style="display:none;">

<a href="#" class="dropdown-toggle" data-toggle="dropdown">

<b>

<span t-esc="(len(user_id.name)&gt;25) and (user_id.name[:23]+'...') or user_id.name"/>

<span class="caret"></span>

</b>

</a>

<ul class="dropdown-menu js_usermenu" role="menu">

<li id="o_logout"><a t-attf-href="/web/session/logout?redirect=/" role="menuitem">Logout</a></li>

</ul>

</li>

</ul>

</div>

</div>

</div>

</header>

</t>

</t>

</t>

</templates>


0
Avatar
Zrušit
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
how to change tooltip question mark symbol? Vyřešeno
web inheritance qweb templates frontend
Avatar
1
pro 23
2520
How changing the appearance of the Odoo site header template
web templates
Avatar
Avatar
1
pro 22
6014
How to create option for snippets in website template odoo 15 or 16
web templates
Avatar
Avatar
1
lis 22
6091
I did not see my newly created theme as tutorial said
theme website_builder
Avatar
0
zář 21
3996
template inherit by id inherits wrong template
inheritance templates
Avatar
0
dub 21
2439
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now