Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
2144 Näkymät

How can I add a new layout in an existing website's snippet ? It is different from inheriting a  template to add or change something, because a layout *is* a template. Further, I need to add also corresponding snippet's options. 


For example the blog snippet allow to display recent blog posts on a page of the website. There is curently 4 layouts available. How could I add a 5th layout ?

Avatar
Hylkää
Paras vastaus

Hi,

Hi Xavier,

If you need to add extra layouts like 5, 6, or 7 to your Odoo website shop or blog page, you can inherit the template with the ID 'snippet_options' and add '<we-button data-set-ppr="5">5</we-button>' or '<we-button data-set-ppr="6">6</we-button>' into the existing code, similar to this:

<we-select class="o_wsale_ppr_submenu" data-dependencies="grid_view_opt" data-no-preview="true" data-reload="/">

    <we-button data-set-ppr="2">2</we-button>

    <we-button data-set-ppr="3">3</we-button>

    <we-button data-set-ppr="4">4</we-button>

    <we-button data-set-ppr="5">5</we-button> <!-- New layout option -->

    <we-button data-set-ppr="6">6</we-button> <!-- New layout option -->

</we-select>

Please note that the provided code snippet is sourced from the snippet template of shop page, and you can add the options for layouts 5 and 6 using XPath and choose this method for blog page also.


Hope it helps


Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
helmik. 24
5133
1
marrask. 23
3165
1
heinäk. 23
4088
1
maalisk. 23
3602
2
helmik. 21
7505