Full Blog Post widget with Author Info - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Full Blog Post widget with Author Info

  • Full Blog Post widget with Author Info
  • 0e3d551e-37c1-6deb-a958-ff0000446526_2016-11-03_1724.png

    I want to show author's first name , last name, Image and about author (sitefinity user ) of blog at the  full blog post widget like the  attach image  2016-11-03_1724.png

     

    i'm using the built-in widget to show the full blog post.

     below is the widget template markup to display the blog post

    <%@ Control Language="C#" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit"
        Assembly="Telerik.Sitefinity" %>
    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Modules.Comments.Web.UI.Frontend" TagPrefix="comments" %>
    <%@ Import Namespace="Telerik.Sitefinity" %>
    <%@ Import Namespace="Telerik.Sitefinity.Web.UI" %>
    <%@ Import Namespace="Telerik.Sitefinity.Modules.Comments" %>

    <sf:SitefinityLabel id="title" runat="server" WrapperTagName="div" HideIfNoText="true" HideIfNoTextMode="Server" /> 
      
      <div class="zone bg-color-white">
    <div class="row">
    <div class="container-d">
    <div class="blogpage-box">
      
    <telerik:RadListView ID="SingleItemContainer" ItemPlaceholderID="ItemContainer" AllowPaging="False"
        runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
        <layouttemplate>
                <%-- <div class="sfpostLinksWrp">
                    <sf:MasterViewHyperLink class="sfpostBack sfback" Text="<%$ Resources:BlogResources, allposts %>" runat="server" />
                </div> --%>
                <asp:PlaceHolder ID="ItemContainer" runat="server" />
        </layouttemplate>
        <itemtemplate>
            <div class="sfpostDetails sfdetails" data-sf-provider='<%# Eval("Provider.Name")%>'  data-sf-id='<%# Eval("Id")%>' data-sf-type="Telerik.Sitefinity.Blogs.Model.BlogPost">
            <sf:FieldListView ID="PostTitle" runat="server" 
                Text="0" Properties="Title" 
                WrapperTagName="h1" WrapperTagCssClass="sfpostTitle sftitle" EditableFieldType="ShortText"
            />
            <div class="sfpostAuthorAndDate sfmetainfo">
                <asp:Literal ID="Literal2" Text="<%$ Resources:Labels, By %>" runat="server" /> 
                <sf:PersonProfileView runat="server" /> 
                <sf:FieldListView ID="PostDate" runat="server" 
                    Format=" | PublicationDate.ToLocal():MMM dd, yyyy" 
                />
              <asp:Literal ID="Literal2" Text="Author Info" runat="server" />
              
                <comments:CommentsCountControl runat="server" 
                    ThreadKey='<%# ControlUtilities.GetLocalizedKey(Eval("Id"), null, CommentsBehaviorUtilities.GetLocalizedKeySuffix(Container.DataItem.GetType().FullName)) %>'  
                    AllowComments='<%# Eval("AllowComments") %>' 
                    ThreadType='<%# Container.DataItem.GetType().FullName %>' 
                    NavigateUrl="#commentsWidget" 
                    DisplayMode="ShortText"/>
                
                <comments:CommentsAverageRatingControl runat="server" 
                    ThreadKey='<%# ControlUtilities.GetLocalizedKey(Eval("Id"), null, CommentsBehaviorUtilities.GetLocalizedKeySuffix(Container.DataItem.GetType().FullName)) %>'
                    ThreadType='<%# Container.DataItem.GetType().FullName %>' 
                    NavigateUrl="#commentsWidget" 
                    DisplayMode="FullText"/>
            </div>
            <sf:FieldListView ID="PostContent" runat="server" 
                Text="0" Properties="Content" 
                WrapperTagName="div" WrapperTagCssClass="sfpostContent sfcontent" EditableFieldType="LongText"
            />
              
                
                <asp:PlaceHolder ID="socialOptionsContainer" runat="server">
                </asp:PlaceHolder>
                <comments:CommentsWidget runat="server" 
                    ThreadKey='<%# ControlUtilities.GetLocalizedKey(Eval("Id"), null, CommentsBehaviorUtilities.GetLocalizedKeySuffix(Container.DataItem.GetType().FullName)) %>' 
                    AllowComments='<%# Eval("AllowComments") %>' ThreadTitle='<%# Eval("Title") %>' ThreadType='<%# Container.DataItem.GetType().FullName %>' 
                    GroupKey='<%# ControlUtilities.GetUniqueProviderKey("Telerik.Sitefinity.Modules.Blogs.BlogsManager", Eval("Provider.Name").ToString()) %>'
                    DataSource='<%# Eval("Provider.Name")%>' />
          </div>
        </itemtemplate>
    </telerik:RadListView>
      </div>
      </div>
      </div>
        </div>

     

     

    Can any one guide me and provide the steps to achieve the Post owner information on post detail widget

    Your help will be appreciated

     

     

  • Hi Mubashir, here the thread, with exactly the same problem where you can find solution suitable for you: http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/retrieving-post-author-details-avatar-nickname-etc-in-blog-post-templates
  • Hi,

    I have the read the link , but actually i have to show author information  like name, image and about author on single blog post widget specifically. Sharing the link the way i want information to be displayed

    www.sitefinity.com/.../from-project-inception-to-post-release-optimization

    The author part at the bottom of the page as given , i want it in that way.

  • Hi Mubashir ,
    I have written a article for you that will help you. 

    Author Information with blog post

  • Thanks Tabish for your response ,found it really helpful  !