How to create dynamic store pages with some content obtained

Posted by Community Admin on 04-Aug-2018 14:30

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

All Replies

Posted by Community Admin on 08-Apr-2015 00:00

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

Posted by Community Admin on 13-Apr-2015 00:00

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
 

This thread is closed