Creating Pages Using Native API/Fluent API
Hello,
I am trying to create pages using Native API/Fluent API in visual studio, i am not sure how to start? After opening my project in visual studio where/how do i need to add the code to create the pages? Please provide an example. I saw link in the sitefinity but it doesn't provide information from scratch.
docs.sitefinity.com/for-developers-create-pages
Thank you
Kiran
Hi Kiran,
The easiest way to create a page programmatically is to add a new webform to your project and then put the code sample provided in our documentation in it. The approach is the same both for Native and Fluent API.
Regards,
Kaloyan
Telerik
Hi Kaloyan,
Thanks for the response. I added a new webform and put the code sample and rebuild the solution. when i go back to administration i didn't see the page created. am i missing anything in here? let me know.
Thanks,
Kiran
Hello Kiran,
The sample provided in our documentation points how a page can be created using SItefinity API. In order to do this you have to call the method with the following parameters:
string
pageName,
bool
isHomePage, Guid parentPageNodeId