Try Now
More in this section

Forums / Developing with Sitefinity / How to create Module though API

How to create Module though API

2 posts, 0 answered
  1. Hardeep
    Hardeep avatar
    1 posts
    18 Sep 2014
    09 Jan 2015
    Link to this post

    How to create Module though API. 

    1) I can goto Administrator--> Module Builder and the create module.  (This step I want to do through API)

    2) And then go-to the newly create module and add content type to it. 

    3) Then I can click Code reference for <Module Name created in step 1> and use API's to add/remove/update items inside the module (content type)

     Now question is how do I can create module with API. I want to insert data through API which is possible with the code provided in step 3, but in-case we can't find module then system should do following

    1. Create module (through API)
    2. Activate it
    3. Add content type (Something like Name, type, text, Review date etc.)


    Note: I am able to insert data to module through API's and only needed a way to create module with API.


  2. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    26 Mar 2015
    14 Jan 2015
    Link to this post
    Hello Hardeep,

    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. 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.

    Creating the dynamic module itself via the Api is not possible due to the complexity of the implementation and the fact that all the Api is internal.

    Alternatively, module structure can be exported and imported from the UI which can save time.

    I hope this helps.

    Ivan D. Dimitrov
    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
2 posts, 0 answered