Create Dynamic Module using the API

Posted by Community Admin on 04-Aug-2018 17:08

Create Dynamic Module using the API

All Replies

Posted by Community Admin on 11-Jun-2014 00:00

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

Posted by Community Admin on 12-Jun-2014 00:00

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.

Posted by Community Admin on 12-Jun-2014 00:00

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.
.SaveChanges();

Posted by Community Admin on 16-Jun-2014 00:00

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
Regards,
Sabrie Nedzhip
Telerik
 
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
 

This thread is closed