Author: |
ACSONE SA/NV, Odoo Community Association (OCA) |
License: |
AGPL-3 |
Branch: |
16.0-mig-website_dynamic_snippet |
Repository: |
acsone/website |
Dependencies: |
web_editor,
website,
and
website_parameterized_snippet |
Languages: |
JavaScript (154, 48.9%),
Python (35, 11.1%),
XML (90, 28.6%),
and
reStructuredText (36, 11.4%) |
Other branches: |
10.0-add-website_dynamic_snippet-jne,
and
10.0-lns_master |
<img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.svg">
<a name="website-dynamic-snippet"></a>
<h2>Website Dynamic Snippet</h2>
<p>This module allows to implement dynamic snippet based on a backend's model</p>
<a name="configuration"></a>
<h2>Configuration</h2>
<p>To implement your dynamic snippet you have to:</p>
<ul class="simple">
<li>Add a dependency into your custom module from "website_dynamic_snippet" and the module that adds the model you want
to show into the website. Here we can take "event" for exemple.</li>
<li><dl class="first docutils">
<dt>You have to create your snippet as all other snippet. Into the tag "<section>" you have to add those properties too:</dt>
<dd><ul class="first last">
<li>class="website_dynamic_finder_related_entry oe_snippet_body"</li>
<li>data-model-name='blog.post'</li>
<li>data-template-id='website_blog_dynamic_snippet.blog_post_snippet_list'> with the last one taht is the template that will be dynamiccaly called</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>Once the templating is over you have to make an inherit from the backend's model to 'website.dynamic.snippet' that is define here as an Abstract model</dt>
<dd>_name = "event.event"
_inherit = ['event.event', 'website.dynamic.finder']<ul class="last">
<li>If you want to extend the behavior of the research you can also overwrite the defined method "get_datas" or "get_domain". By default it also add a is_favorite field used
to create a priority onto the dynamic content shown into the frontend.</li>
</ul>
</dd>
</dl>
</li>
</ul>
<a name="bug-tracker"></a>
<h2>Bug Tracker</h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/website/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
<a class="reference external" href="https://github.com/OCA/website/issues/new?body=module:%20website_dynamic_snippet%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">here</a>.</p>
<a name="credits"></a>
<h2>Credits</h2>
<a name="contributors"></a>
<h3>Contributors</h3>
<ul class="simple">
<li>Laurent Mignon <<a class="reference external" href="mailto:laurent.mignon@acsone.eu">laurent.mignon@acsone.eu</a>></li>
<li>Jonathan Nemry <<a class="reference external" href="mailto:jonathan.nemry@acsone.eu">jonathan.nemry@acsone.eu</a>></li>
</ul>
<a name="maintainer"></a>
<h3>Maintainer</h3>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>This module is maintained by the OCA.</p>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>To contribute to this module, please visit <a class="reference external" href="http://odoo-community.org">http://odoo-community.org</a>.</p>