title: How to override default odoo 8 website header section
body: <p>I am trying to override default header section of odoo 8 website with my own design but am getting errors when i use xpath expression and do a replace. See code below :</p>
  
  <p>header.xml code</p>
  
  <pre><code>   &lt;template id="layout_replace_menu_header" customize_show="True" inherit_id="website.layout" name="custom_header_replace"&gt;
        &lt;xpath expr="//div[@class='navbar navbar-default navbar-static-top']" position="replace"&gt;
            &lt;header&gt;
                &lt;div class="header"&gt;
                        &lt;div class="container"&gt;
                          &lt;a class="site-logo" href="#"&gt;&lt;img src="/themeotb2/static/otbassets/img/logo.png" alt="image" /&gt;&lt;/a&gt;
  
                          &lt;a href="javascript:void(0);" class="mobi-toggler"&gt;&lt;i class="fa fa-bars"&gt;&lt;/i&gt;&lt;/a&gt;
  
                          &lt;!-- BEGIN NAVIGATION --&gt;
                          &lt;div class="header-navigation pull-right font-transform-inherit"&gt;
                            &lt;ul&gt;               
                                  &lt;t t-foreach="website.menu_id.child_id" t-as="submenu"&gt;
                                      &lt;li class="dropdown"&gt;
                                           &lt;t t-call="website.submenu"/&gt;
                                      &lt;/li&gt; 
  
                                  &lt;/t&gt;
                              &lt;!-- BEGIN TOP SEARCH --&gt;
                              &lt;li class="menu-search"&gt;
                                &lt;span class="sep"&gt;&lt;/span&gt;
                                &lt;i class="fa fa-search search-btn"&gt;&lt;/i&gt;
                                &lt;div class="search-box"&gt;
                                  &lt;form action="#"&gt;
                                    &lt;div class="input-group"&gt;
                                      &lt;input type="text" placeholder="Search" class="form-control" /&gt;
                                      &lt;span class="input-group-btn"&gt;
                                        &lt;button class="btn btn-primary" type="submit"&gt;Search&lt;/button&gt;
                                      &lt;/span&gt;
                                    &lt;/div&gt;
                                  &lt;/form&gt;
                                &lt;/div&gt; 
                              &lt;/li&gt;
                              &lt;!-- END TOP SEARCH --&gt;
                            &lt;/ul&gt;
                          &lt;/div&gt;
                          &lt;!-- END NAVIGATION --&gt;
                        &lt;/div&gt;
                      &lt;/div&gt;    
            &lt;/header&gt;
  
          &lt;/xpath&gt;
      &lt;/template&gt;  
  </code></pre>
  
  <p>When i use "inside" instead of replace the code will execute but when i do replace odoo complains with errors: </p>
  
  <pre><code>  File "/opt/openerp/ttfa/projectdatabase/src/openerp/models.py", line 1270, in _validate_fields
  raise ValidationError('\n'.join(errors))
  ParseError: "ValidateError
  Field(s) `arch` failed against a constraint: Invalid view definition
  
   Error details:
    Element '&lt;xpath expr="//header//a[@class='navbar-brand']"&gt;' cannot be located in parent view
  
  Error context:
   View `Show Logo`
  </code></pre>
  
  <p>How can i solve this? Thank you.</p>