odoo_website_list_page_snippets
Parse Odoo HTML fields to list embedded website snippets, returning index, data-snippet, xpath, text preview, and background URL for blog posts, pages, or products.
Instructions
List snippets currently embedded in a target HTML field. Target can be a blog.post (field=content), website.page (field=arch_db via view_id), product.template (field=website_description), or any HTML field. Parses the HTML with lxml, finds all elements bearing a data-snippet attribute. Returns per-snippet: index, data_snippet, data_name, xpath, text_preview, has_background (detects url() in style), background_url.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No | default | |
| model | Yes | ||
| res_id | Yes | ||
| field_name | Yes | HTML field (e.g. 'content', 'arch_db', 'website_description') | |
| lang | No | Read lang context (default: current user lang) |