Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2314 Weergaven

I try to figure out why my snippet cannot be dropped inside other elements although the code is the same as any regular odoo built-in snippet. Yet it seems that the class on the snippet defines its target.

for example.  s_website_form decides that this snippet can be dropped inside other elements. but why? Where is that behavior defined so I can reproduce it for my own snippet?


section class="s_website_form pt16 pb16 oe_snippet_body" data-vcss="001" data-snippet="s_website_form" data-name="Form">


How can I define my own droppable targets?

Avatar
Annuleer
Beste antwoord

Hi,

We can use data-drop-in and data-drop-near attributes to specify where the snippet should be droppable.

Example

<div id=“id_of_div” t-att-data-selector=“selector_of_snippet” t-attf-data-drop-near=“tags or class or id of elements where the snippet should be dropped near to” data-drop-in="tags or class or id of elements where the snippet should be able to be dropped in to"/>


Regards

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
aug. 21
4260
1
mrt. 17
2802
0
sep. 24
880
0
jun. 24
1380
1
jun. 23
2911