Create Dynamic Module using the API - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Create Dynamic Module using the API

  • Create Dynamic Module using the API
  • Is it possible to create a Dynamic Module without using the Back End Module Builder tool?

  • Sure, it's possible, but it's a very time-consuming task. I wouldn't recommended it unless absolutely necessary. The documentation explains how to do it.

  • I was hoping it's possible to do it programmatically. The following code will not work but demonstrates what I am trying to do.

    //Create the module.
    App.WorkWith().Module().CreateNew(new Guid())
        //Set the properties of the module.
    .Do(b =>
        b.Title = "Testimonials";
        b.Description = "Customer Testimonials";
        b.ContentTypeName = "Testimonial";
        //Save the changes.

  • Hello David,

    Currently you can create dynamic modules only from the Sitefinity backend using the Module Builder. You can refer to the following article from our documentation on how to achieve this. You can also check the following video demonstration. Code samples are automatically generated for the dynamic module you have created and you can use it as a sample on how to work with your dynamic module programmatically - e.g. how to create a dynamic module item, to delete a dynamic module item, to get a collection of dynamic module items through filtering and etc.

    To view the generated code samples please go to Administration -> Module builder and select your module. Then please click on the Code reference for < module name> link which is on the right-hand side of the page. Here is a screenshot for your convenience.

    If you have a specific reason to build your modules programmatically  you may take a look at the following articles from our documentation on how to create custom modules in Sitefinity: 
    1. Custom modules
    2. Create a custom module project
    3. Creating custom modules with Sitefinity Thunder
    4. Sitefinity custom module creation with Thunder - video
    5. Create a Testimonials intra-site module
    Sabrie Nedzhip
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items