Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
2756 Ansichten

how to create an inner content snippet in odoo 16?

Avatar
Verwerfen
Autor

I am not talking about snippets I am talking about inner content snippets like blockquote, alert, and rating snippet available on odoo website I wanted to create the same as there inner content snippets.

Beste Antwort

Hi Usama Gull,

You should check check out data-drop-in and data-drop-near attributes of snippet options. I believe those are the attributes that let's you choose where the snippet should be added. 

I'm adding a code snippet for reference. 

<div data-selector=".o_mega_menu .nav > .nav-link"

data-drop-in=".o_mega_menu nav"

data-drop-near=".o_mega_menu .nav-link"/>

Hope it helps.

Avatar
Verwerfen
Beste Antwort

Hi,

Try refer the following

<template id="template_id" inherit_id="website.snippets">


    <xpath expr="//div[@id='snippet_content']/div[hasclass('o_panel_body')]" position="inside">


        <t t-snippet="module_name.snippet_name"


           t-thumbnail=""/>


    </xpath>


</template>

https://www.cybrosys.com/blog/how-to-create-a-snippet-in-odoo-15-erp

Regards

Avatar
Verwerfen
Autor

I am not talking about snippets I am talking about inner content snippets like blockquote, alert, and rating snippet available on odoo website I wanted to create the same as there inner content snippets.

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Apr. 25
1471
Odoo App Gelöst
1
Nov. 23
2048
0
Mai 24
1778
0
Sept. 23
2703
0
Sept. 23
2348