I've been working on creating a custom theme based on the layout and structure of theme_clean and adding building blocks as snippets is remarkably easy and very simple to understand. Unfortunately I am currently stuck on how to replace or override the automatic footer with my theme's own as it seems i'll need to override and replace the automatic footer which is being pulled from the base theme built into the Odoo CMS/Website collection of modules.
Here's the tags that I can see in the HTML Editor from the base theme:
<data inherit_id="website.footer_custom" optional="enabled" name="Automatic Footer">
<xpath expr="//div[@class='oe_structure']" position="replace">
<div class="container hidden-print">
<div class="row">
<div class="col-md-3">
<h4>Our products & Services</h4>
<ul class="list-unstyled" id="products">
<li><a href="/">Home</a></li>
</ul>
</div>
<div class="col-md-3" id="info">
<h4>Connect with us</h4>
<ul class="list-unstyled">
<li><a href="/page/website.contactus">Contact us</a></li>
</ul>
<ul class="list-unstyled">
<li t-ignore="true"><i class="fa fa-phone"/> <span t-field="res_company.phone"/></li>
<li t-ignore="true"><i class="fa fa-envelope"/> <span t-field="res_company.email"/></li>
</ul>
<h2>
<a t-att-href="website.social_facebook" t-if="website.social_facebook"><i class="fa fa-facebook-square"/></a>
<a t-att-href="website.social_twitter" t-if="website.social_twitter"><i class="fa fa-twitter"/></a>
<a t-att-href="website.social_linkedin" t-if="website.social_linkedin"><i class="fa fa-linkedin"/></a>
<a t-att-href="website.social_youtube" t-if="website.social_youtube"><i class="fa fa-youtube-play"/></a>
<a t-att-href="website.social_googleplus" t-if="website.social_googleplus"><i class="fa fa-google-plus-square"/></a>
<a t-att-href="website.social_github" t-if="website.social_github"><i class="fa fa-github"/></a>
</h2>
</div>
<div class="col-md-5 col-lg-offset-1">
<div>
<h4>
<span t-field="res_company.name"/>
<small> - <a href="/page/website.aboutus">About us</a></small>
</h4>
<p>
We are a team of passionate people whose goal is to improve everyone's
life through disruptive products. We build great products to solve your
business problems.
</p>
<p>
Our products are designed for small to medium size companies willing to optimize
their performance.
</p>
</div>
<ul class="list-inline js_language_selector mt16" t-if="(request.website_multilang and len(languages) > 1) or editable">
<li t-foreach="languages" t-as="lg">
<a t-att-href="url_for(request.httprequest.path + '?' + keep_query(), lang=lg[0])" t-att-data-default-lang="editable and 'true' if lg[0] == website.default_lang_code else None">
<t t-esc="lg[1].split('/').pop()"/></a>
</li>
<li groups="base.group_website_publisher">
<t t-set="url_return" t-value="url_for('', '[lang]') + '?' + keep_query()"/>
<a t-attf-href="/web#action=base.action_view_base_language_install&website_id=#{website.id}&url_return=#{url_return}">
<i class="fa fa-plus-circle"/>
Add a language...
</a>
</li>
</ul>
</div>
</div>
</div>
</xpath>
</data>
I know that I need to add this to layout.xml in my theme folder and I have successfully added a section that allows me to add javascript and other code after the closing </footer> tag on the page with the following code:
<template id="clean_script_footer" inherit_id="website.layout" name="Clean scripts">
<xpath expr="//footer[last()]" position="after">
<!-- Custom Theme Footer Scripts -->
<script src="/theme_custom/static/js/custom.js"></script>
</xpath>
</template>
I've tried to use the following code to replace/override the automatic footer:
<template id="clean_script_footer_custom" inherit_id="website.layout" optional="enabled" name="Automatic Footer">
<xpath expr="//div[@class='oe_structure']" position="replace">
<!-- Insert footer code here -->
</xpath></template>
However this is obviously incorrect and is throwing some traceback errors when I try to install the theme.
I'm also trying to do a similar thing with the header so that I can replace the default navigation menu and header with my own.
Has anyone had any success with replacing default headers (ie. nav menu) and footers on Odoo 8.0 yet?
The rest of the basic theme development looks like it will be incredibly easy thanks to the brilliant simplicity of the templating system. I have to say, hats off to the developers behind this project, it looks like it's going to be a real game-changer.