ビルディングブロック¶
You can design your website by dragging and dropping building blocks, then editing them to fit your content and layout needs.
Add a building block¶
To add a block to a website page, access the page, click Edit, then drag and drop the desired building block into the appropriate location. Two types of building blocks are available: Categories and Inner Content. Inner Content building blocks can only be added into Categories building blocks.
When clicking a category block, a popup appears, allowing you to select between multiple templates for each category.
ちなみに
Search for a specific block in the Insert a block popup using the search bar.
Once the category block is placed, you can drag and drop Inner content blocks within it. The Inner content blocks allow you to add elements, such as videos, images, social media buttons, etc., into pre-existing category blocks.
注釈
You can also add a building block on the login page. To do so, navigate to the website's homepage, add
/web/loginto the URL and pressEnter.Access to certain blocks requires installing their respective application or module (e.g., eCommerce for the Products block).
Example
Add all your social media accounts in one place with the inner content Social Media block. Toggle the switch on or off next to the desired platform and copy/paste your account URL.
フォーム¶
The Form block is used to collect information from website visitors and, if applicable, create records in your database. To add a form to a website page, drag and drop the Contact & Forms category block, then select a block in the popup.
アクション¶
By default, when the form is submitted, an email containing the information entered by the visitor is automatically sent. Depending on the apps installed on your database, additional actions that can automatically create records may become available. To choose a different action, click Edit, click the form, navigate to the Style tab, and select the desired Action:
Apply for a Job (Recruitment)
Create a Customer (eCommerce)
Create a Ticket (Helpdesk)
Create an Opportunity (CRM)
Subscribe to Newsletter (Email Marketing)
Create a Task (Project)
More models: to generate other types of records
By default, submitting the form redirects visitors to a Thank you page. Use the URL field to send them to a different page. Alternatively, you can choose not to redirect and keep them on the form's page by selecting Nothing or Show Message in the On Success field.
フィールド¶
To add a new field to the form, navigate to the Style tab and click the + Field button next to the Form or Field section. To modify any field on the form, select the field, then use the options available in the Field section of the Style tab. For example, you can:
Change the field Type.
ちなみに
It is also possible to select an Existing Field from the database and use the data it contains. The fields available depend on the selected action. Property fields added to the database can also be used.
Some fields are visually similar, but the data entered must follow a specific format.
Edit the field's Label and adapt its Position.
Enable a field Description. Toggle the switch on and click the default description on the form to modify it.
Add a Placeholder or Default value.
Specify if the field is Required.
Edit the field's visibility settings.
Add an animation.
Once you have made the desired changes, click Save.
Add an Odoo contact form on a non-Odoo website¶
You can display an Odoo contact form on another website using an iframe. To do so, follow these steps:
Prepare the Odoo form: Create a contact form on a page in Odoo Website and remove the header design and the footer design. Make sure only the contact form remains on the page.
Generate an embeddable code: Copy the URL of the Odoo form page and paste it into an iframe generator, such as La Digitale.dev or iFrame Generator . Adjust the width and height for proper display.
Add the embedded code to the non-Odoo website: Open the relevant page’s HTML (in the code editor or CMS) and insert the embedded code where the form should be displayed.
Example
Example of an embedded code:
<iframe src="https://example.com/odoo-form"
style="border:0;"
name="odooForm"
scrolling="no"
frameborder="0"
marginheight="0"
marginwidth="0"
height="400px"
width="600px"
allowfullscreen>
</iframe>
埋込コード¶
Embedding code allows you to integrate content from third-party services into a page, such as videos from YouTube, maps from Google Maps, social media posts from Instagram, etc.
After dragging and dropping the Embed Code block from the Inner Content section into a page, click the block, then go to the Style tab and click Edit. Replace the placeholder code with your custom embed code.
警告
Do not copy/paste code you do not understand, as it could put your data at risk.
Move, switch, duplicate or delete a building block¶
Pull the turquoise borders on the block to reduce or increase the space at the top or bottom of it.
Change the block order by clicking (chevron up) or (chevron down) and move the block on the page by clicking (arrows). When you have multiple columns, move a column to the left or right by clicking (chevron left) or (chevron right).
To duplicate a building block, click (duplicate). Once duplicated, the new block appears on the page beneath the original one.
ちなみに
Alternatively, click the (duplicate) icon at the top of the Style tab to duplicate the selected block.
To delete a block, click (trash).
Edit a building block¶
To edit the content of a building block, click it and go to the Style tab. Available customization options vary depending on the type of block selected.
背景¶
To modify the background of a building block, select the block, go to the Style tab, and click the color dot or another Background option. You can change the color and/or add an image, video, and/or shape. Once you've selected a shape, new fields appear to allow you to customize the shape.
ちなみに
Position an element (image, text, etc.) behind or in front of another one by using the Send to back or Bring to front icons.
To resize a block, click and drag the dots around its edges to adjust it as needed.
Layout: grid and columns¶
For most building blocks, you can choose between two layout styles: grid or columns (cols). To change the default layout style, click the block, go to the Style tab, and set the Layout field to Grid or Cols.
グリッド¶
The Grid layout allows you to reposition and resize elements, such as images or text, by dragging and dropping them. When Grid is selected, additional options are available to Add Elements by clicking Image, Text, or Button.
Cols¶
Choosing the Cols layout allows you to determine the number of elements per line within the block. To do so, select the block to modify, click the dropdown next to the Cols field, and adjust the number. You can then modify a specific column's settings using the options in the Column section of the Style tab.
注釈
By default, on mobile devices, only one element (column) is visible per line to ensure that content remains easily readable and accessible on smaller screens. To adjust the value, click the (mobile icon) at the top of the website editor and adapt the number of columns. Shapes are hidden by default on mobiles.
Save a custom building block¶
You can save a customized building block to reuse it elsewhere. To do so, select it, navigate to the Style tab, and click the (floppy disk) icon. Click the Save button in the popup to confirm saving your custom block.
To add a saved building block to the page, navigate to the Blocks tab and drag and drop the Custom block from the Categories section. In the popup that opens, click the desired block in the Custom category.
ちなみに
In the Insert a block popup, click (edit) to rename the custom block or (delete) to delete it.
Create an anchor link¶
Anchor links are hyperlinks that direct users to a specific section of a page. To create an anchor link for a block, follow these steps:
Click Edit and select the block you want to link to.
Click (link) at the top of the Style tab.
To edit the default anchor name, click Edit in the green popup message that opens.
Replace the anchor name and click Save & copy.
Once the anchor is saved, you can link to it from anywhere on your website.