Skip to content

Instantly share code, notes, and snippets.

@sniper7kills
Created March 7, 2015 21:44
Show Gist options
  • Save sniper7kills/0c34b7f69579fe38c411 to your computer and use it in GitHub Desktop.
Save sniper7kills/0c34b7f69579fe38c411 to your computer and use it in GitHub Desktop.
Odoo layout.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="theme_epona_layout" inherit_id="website.layout">
<xpath expr="//div[@id='wrapwrap']/header" position="replace">
<header>
<div class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-top-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"/>
<span class="icon-bar"/>
<span class="icon-bar"/>
</button>
<a class="navbar-brand" href="/" t-if="website" t-field="website.name">My Website</a>
</div>
<div class="collapse navbar-collapse navbar-top-collapse">
<ul class="nav navbar-nav navbar-right" id="top_menu">
<t t-foreach="website.menu_id.child_id" t-as="submenu">
<t t-call="website.submenu"/>
</t>
<li class="divider" t-ignore="true" t-if="website.user_id != user_id"/>
<li class="dropdown" t-ignore="true" t-if="website.user_id != user_id">
<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"/>
</b>
</a>
<ul class="dropdown-menu js_usermenu" role="menu">
<li><a t-attf-href="/web/session/logout?redirect=/" role="menuitem">Logout</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</header>
</xpath>
<xpath expr="//div[@id='wrapwrap']/main" position="replace">
<main>
<t t-raw="0"/>
</main>
</xpath>
<xpath expr="//div[@id='wrapwrap']/footer" position="replace">
<footer>
<div id="footer">
</div>
</footer>
</xpath>
</template>
</data>
</openerp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment