Use the code example below to create a content block and to set its ID, Title, Name, Content, and Author with the Fluent API.
NOTE: In the code example, the ID argument is assigned to the master version of the content block.
You must first initialize the content block facade by calling App.WorkWith().ContentItem(). You create the content block using the CreateNew method of the facade. Then, you set the properties of the content block. To publish the page, you use the Publish method of the facade. Finally, you save the changes.
Create a content block with the Fluent API
Sign up for our free beginner training. Boost your credentials through advanced courses and certification. Register for Sitefinity training and certification.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important