Skip to Content
Menu
This question has been flagged
1962 Views

Hello,


I've created my own widget and it work perfectly.

This widget create a link shortcut with anchor.

The problem is that actually the link adress is hard coded.

I would like to know if there is a way, when i drag and drop the widget on the page that the popup of the link open itself or if i must all the time click myself on the link edit button (CTRL K) to complete it.

Like that i could enter the name of the link and directly set the # of the anchor without click on the link button


there is the code of the widget :


<template id="snippet_id" name="Test" inherit_id="website.snippets">

<xpath expr="//div[@id='snippet_feature']/div[@class='o_panel_body']" position="inside">

<div>

<div class="oe_snippet_thumbnail">

<img class="oe_snippet_thumbnail_img" src="/theme_test/static/src/img/anchor.png"/>

<span class="oe_snippet_thumbnail_title">Anchor</span>

</div>

<section class="sectionLeft">

<a href="#Test1">

<div class="containerLeft">

<p>Lorem ipsum dolor sit amet.</p>

</div>

</a>

</section>

</div>

</xpath>

</template>

Avatar
Discard