Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To assign a value to an HTML attribute on an Odoo website, you can use either the template editor or the developer mode.

In the template editor:

  1. Go to your Odoo website and click on the Edit button on the top right corner.
  2. Select the page or block where you want to add the HTML attribute.
  3. Click on the Edit button again to enter the template editor.
  4. Locate the HTML element where you want to add the attribute and click on it.
  5. Add the attribute and its value within the element's tag, like this: <element attribute="value"></element>
  6. Save and publish your changes.

In the developer mode:

  1. Go to your Odoo website and activate the developer mode by adding "/web#debug" at the end of its URL.
  2. Click on the Edit button to enter the Edit mode.
  3. Right-click on the HTML element where you want to add the attribute and select "Inspect Element" from the drop-down menu.
  4. In the inspect panel, locate the HTML element and add the attribute and its value within the element's tag.
  5. Exit the inspect panel and click on the Save button to apply your changes.
  6. Exit the developer mode and publish your changes.