Content Injection allows you to update site content using Duda's API instead of opening the editor. It's a great option for pushing new site content and creating templates without using a site's Content Library to store the data.
Content Injection provides you a way to identify a particular element and target it to change a few common properties, which we call Content Types. There are three types of content available to you when using Content Injection: innerHTML, DOM attributes, and CSS rules.
innerHTML property to include different text, child elements, or other content. For example, a common use case would be to update the headline and subheadline after creating a new site from a template.
The DOM Attribute content type allows you to update a specific attribute of an element. For example, you can change an anchor tag's
The CSS Rule content type allows you to update any style property of an element. For example, you could change the
transition property of an element to alter its animation so that returning site visitors receive a slightly different experience during their next visit.
Updated over 1 year ago