dynamic "pages"

Posted by Community Admin on 05-Aug-2018 19:45

dynamic "pages"

All Replies

Posted by Community Admin on 02-Feb-2011 00:00

I think I'm missing something simple. But my question isn't being answered in the example modules anywhere. I thought the "product" module would help, but it's missing the obvious end-user "Catalog" portion of the module. If I create a new object/content type (like a blog post/entry) how does the URL get mapped/routed to my content? Is each blog post a "page"? Or is the "blog" itself a page, with my blog control on it which might display a different data according to the URL? (like DotNetNuke)

I want to create some new content types that users will interact with....like a knowledge base or download center. From what I've seen, I guess I'm missing the relationship between the Page and the Template used in the hospital News and Events features. How is that accomplished if I wanted to do something similar for my downloads? How could I do it if I wanted to use a different display template or layout for each blog or blog post? (as an example of some commonly asked-for features)

Posted by Community Admin on 04-Feb-2011 00:00

Hi Eric,
There is no creation of implicit pages in Sitefinity. When you want to display blog posts, you create a page manually and put a BlogPosts control on a page. When you're on the page, all posts show up (either from all blogs, or from the blogs you selected in the options of the control). The URL when you click on a single post looks something like this:
example.com/.../your-post-url

We use ASP.NET Routing. This URL is routed to the page containing the BlogPost control. From then on, 
all work is done by the BlogPosts control. It takes the URL and tries to determine which single post to display (each post has the last portion of the URL after the blog name saved with it in the database). If it can find a post, it displays it. This is not done by the control itself, but other components handling URL evaluation. This is irrelevant to the discussion, though.

The same scheme is valid for any new content type that you create. The conditions are that:

  • You derive the type from Telerik.Sitefinity.GenericContent.Model.Content
  • You use a control, which inherits from ContentView to display it.
That's just one of the things that the ContentView control does for you. As long as you use it, you should be fine.

Regards,
Slavo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.

This thread is closed