Skip to Content
Menu
This question has been flagged
2 Replies
3793 Views

Why did this work:

<template id="custom_content" inherit_id="website.layout">
 <xpath expr="//main" position="replace">

// content 

</xpath>
</template>


and this not:

<template id="custom_footer" inherit_id="website.layout">
 <xpath expr="//footer" position="replace">

// content 

</xpath>
</template>

Avatar
Discard
Author Best Answer

Ok. Ist working, but:

f i try to build a static footer with just static HTML, its not possible to replace the "default content".

Trying to remove 

<div class="oe_structure" id="footer"></div>

 

<template id="footer_custom" inherit_id="website.layout" name="Footer">    
<xpath expr="//div[@id='footer']" position="replace">
        <div>static content</div>
</xpath>
</template>

causes an error.


And just editing id=footer will be ignored

<template id="footer_custom" inherit_id="website.layout" name="Footer">            
    <xpath expr="//div[@id='footer']" position="replace">
        <div id="footer">
            <div>new content</div>
        </div>
    </xpath>
</template>

it looks like replacing contents inside of if=footer is not possible.

Avatar
Discard
Best Answer
<template id="footer_custom" inherit_id="website.layout" name="Footer">
    <xpath expr="//div[@id='footer']" position="replace">
        <div class="oe_structure" id="footer">
            <section>
                <div class="container">
                    <div class="row">
                        <!-- content -->
                    </div>
                </div>
            </section>
        </div>
    </xpath>
</template>

I think this would be the way to replace the footer.

Avatar
Discard
Related Posts Replies Views Activity
1
Feb 17
2486
4
Apr 16
5657
1
Jan 16
5593
3
Nov 16
3972
Theme Solved
2
Nov 24
178