+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / How to create dynamic store pages with some content obtained dynamically from an existing database

How to create dynamic store pages with some content obtained dynamically from an existing database

2 posts, 0 answered
  1. Alex
    Alex avatar
    5 posts
    Registered:
    19 Mar 2014
    08 Apr 2015
    Link to this post

    I am in the process of creating a website using Sitefinity. I am intending to create a number of store pages such as websitename/stories/New York websitename/stories/San Francisco etc.

    The content for these pages will be retrieved from an internal systems database to get things like opening hours, phone numbers etc.

     What I am not sure about is how to best implement this in Sitefinity. Any suggestions would be most useful.
     

    Thanks in advance for any help

  2. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    Registered:
    09 Dec 2016
    13 Apr 2015
    Link to this post
    Hello Alex,

    As far as I understand you would like to create pages programmatically and add some html content to this pages and you will get the information from an external database.

    Please note that in Sitefinity we display content on the pages using widgets. If you create the page from the Sitefinity backend you can drag and drop different widgets depending on what you would like to display on the page and place the widgets on the desired placeholders. 

    When creating the pages programatically if you would like to add some content on the page, you will need to add the control to the page programmatically. 

    In your case, if you would like to add an html content on a page, you need to add a Content Block control to a page programatically and add the desired html in the content block. You may refer to the following article from our documentation on how you can add controls to a Sitefinity page. You may also refer to the whole section form our documentation for adding and removing controls to a page at the following link.

    Here is also an forum thread where you can find sample code for adding a Content block to a page using the Fluent API.

    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
     
2 posts, 0 answered