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

Forums / Developing with Sitefinity / Blog post masterpage / template

Blog post masterpage / template

7 posts, 0 answered
  1. Gayan Perera
    Gayan Perera avatar
    7 posts
    Registered:
    24 Apr 2010
    14 Nov 2010
    Link to this post
    Hi

    Our current page structure is:
    blog.aspx - shows all blog posts - we can modify the page template
    /blog/person.aspx - shows blog posts by person - we can modify the page template

    then when a visitor clicks on a blog post to view the full post it redirects them to
    /blog/dd-MM-yy/title-blah-blah.aspx

    Where is the template for /blog/dd-MM-yy/title-blah-blah.aspx ? this page is auto served via the blog handler but it seems to use a template, how does it know which page template to use?

    I can edit the ContentViewSingleItem.ascx to modify how the post/comments look like. Can you please tell me where/what I need to edit to change the page template that this auto served page is using?

    cheers
    Gayan
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Nov 2010
    Link to this post
    Hello Gayan,

    The BlogPosts control has a public properties in its Advanced Tab >> Appearance section

    • ItemListTemplatePath - sets the template for the list mode where all posts are listed
    • SingleItemTemplatePath - sets the template for details mode - when a single item is opened.
    You can take a look at How to map a template and Working with presentation modes

    Since version 3.6 we use embedded templates. If you want to modify a template you should map it as show above.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Gayan Perera
    Gayan Perera avatar
    7 posts
    Registered:
    24 Apr 2010
    15 Nov 2010
    Link to this post
    Hi Ivan

    Thanks for the reply, but I still don't understand how I can modify the page template for the "/blog/dd-MM-yy_post-title.aspx" page?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Nov 2010
    Link to this post
    Hello Gayan,

    This is the template set through SingleItemTemplatePath. This is the template of BlogPost control. I hope that this makes sense to you.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Gayan Perera
    Gayan Perera avatar
    7 posts
    Registered:
    24 Apr 2010
    15 Nov 2010
    Link to this post
    Is there a sample template I can copy and modify?

    If I look at "ControlTemplates\Blogs\ContentViewSingleItem.ascx" it doesn't have any markup for a masterpage...
  6. Gayan Perera
    Gayan Perera avatar
    7 posts
    Registered:
    24 Apr 2010
    15 Nov 2010
    Link to this post
    For example
    /blogs.aspx - uses masterpage #1
    /blogs/dd-MM-yy_post-title.aspx - needs to use master page #2

    How do I do this?
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Nov 2010
    Link to this post
    Hello Gayan,

    1. This is the same page, just the control pages its mode and the url QueryString
    2. You can change the theme at runtime by creating a custom class that inherits from InternalPage and overriding GetTheme method.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
7 posts, 0 answered