Content injection (SECTION elements)
Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.
The inject_page_section tool calls Duda’s
Page Elements Create
endpoint with type: "SECTION". The Duda app calls this content injection
— useful for sticking reusable hero sections, CTAs, or footers onto pages
programmatically.
Tool call
Section titled “Tool call”inject_page_section site_id="<duda-site-id>" page_id="<page-uuid>" element_source_id="<section-site-alias>" next_sibling_id="<existing-element-id>" // optional — insert before this element parent_element_id="<existing-container-id>" // optional — insert inside this containerReturns { type: "SECTION", element_id: "<new-id>", element_source_id, next_sibling_id }.
Required field — element_source_id
Section titled “Required field — element_source_id”This is the site alias of a SECTION you’ve defined in the Duda dashboard. Find it by:
- Open the Duda editor
- Right-click on a SECTION (purple-bordered block)
- Set Site Alias → name it (eg
hero-with-cta) - Use that alias as
element_source_idin MCP calls
Without a site alias, the section cannot be injected via API.
Placement
Section titled “Placement”- Default (no
next_sibling_idorparent_element_id): appended to end of page body - With
parent_element_id: appended inside that container - With
next_sibling_id: inserted before that element
Limits
Section titled “Limits”- Currently only
type: "SECTION"is supported by Duda — no widget-level injection - Injection is page-state-aware: if the page is
PUBLISHED, the new section ends up STAGED until next site publish (this is Duda’s behaviour, not the worker’s)
Hard rule
Section titled “Hard rule”The injection itself doesn’t publish anything — the page stays in whatever
state it was. To take the change live: publish manually in Duda dashboard
or flip the page to STAGED_DRAFT via update_page_draft.