custom blog design or template

Posted by Community Admin on 03-Aug-2018 15:25

custom blog design or template

All Replies

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

Hello

I want to create a custom blog post control which it should display only one particular blog (using API) and below i should able to add comments with out going another page 

please send me the sample template.

thanks
jmr

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

Hello Jmr,

In your template you can declare

<sf:ContentView
             id="commentsDetailsView"
             ControlDefinitionName="EventsCommentsFrontend"
             DetailViewName="CommentsDetailsView"
             ContentViewDisplayMode="Detail"
             runat="server" />


Then in the code behind you have to bind the control you have and the content item comments

/// <summary>
     /// Handles the ItemDataBound event of the DetailsView control.
     /// </summary>
     /// <param name="sender">The source of the event.</param>
     /// <param name="e">The <see cref="Telerik.Web.UI.RadListViewItemEventArgs"/> instance containing the event data.</param>
     private void DetailsView_ItemDataBound(object sender, RadListViewItemEventArgs e)
     
         if (e.Item.ItemType == RadListViewItemType.DataItem || e.Item.ItemType == RadListViewItemType.AlternatingItem)
         
             var view = e.Item.FindControl("commentsDetailsView") as ContentView;
             this.InitCommentsView(view);
         
 
         if (this.IsInBrowseAndEditMode())
         
             BrowseAndEditManager.GetCurrent(this.Page).AddBrowseAndEditToolBar(e.Item, this.Host, this.browseAndEditToolbarId);
         
     
 
     /// <summary>
     /// Handles the ItemCreated event of the DetailsView control.
     /// </summary>
     /// <param name="sender">The source of the event.</param>
     /// <param name="e">The <see cref="Telerik.Web.UI.RadListViewItemEventArgs"/> instance containing the event data.</param>
     private void DetailsView_ItemCreated(object sender, RadListViewItemEventArgs e)
     
         if (e.Item.ItemType == RadListViewItemType.DataItem || e.Item.ItemType == RadListViewItemType.AlternatingItem)
         
             var view = e.Item.FindControl("commentsListView") as ContentView;
             this.InitCommentsView(view);
         
     


Best wishes,
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

This thread is closed