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

Forums / Developing with Sitefinity / can share icons be viewable in truncated blog post

can share icons be viewable in truncated blog post

2 posts, 0 answered
  1. Dave Dechant
    Dave Dechant avatar
    3 posts
    Registered:
    12 May 2010
    15 Oct 2010
    Link to this post
    Hello, 

    I've inserted a blog control into one of my pages. I've truncated the blog stories to show only the first 100 words and then the user can click full story for the remaining story. When this happens a row of "share this story" icons such as facebook, twitter, etc.  is present.

    I'd like these same icons to show up after each blog post in it's truncated form, but as I said they only appear when "full story" is clicked.

    Is there a way to have the icons appear after each blog post even when it's truncated, or will they only appear if I allow the whole story to be seen?

    Thanks for any help!
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    18 Oct 2010
    Link to this post
    Hello Dave Dechant,

    Thank you for using our services.

    Unfortunately this cannot be achieved with the current implementation of the blog posts control. The problem is that the Social Bookmarks' links are constructed using the current page you are on. This means that the the social bookmarks will not point to the single post page, but will point to the page where posts are listed. If this is OK for you you have to map the control template for the blog posts list add the bellow markup:
    <asp:Repeater ID="repeater" runat="server">
     <HeaderTemplate>
            <ul class="sf_postListing">
        </HeaderTemplate>
        <ItemTemplate>
            <li>
                <h2 class="sf_postTitle">
                    <asp:HyperLink ID="fullContent1" runat="server">
                        <asp:Literal ID="Title" runat="server"></asp:Literal>
                    </asp:HyperLink>
                </h2>
                <p class="sf_postDate">
                    <telerik:DateTimeLiteral runat="server" ID="Publication_Date" DateFormatString="D"></telerik:DateTimeLiteral>
                </p>
                <asp:Panel id="pnlPostContent" runat="server" CssClass="sf_postContent">
                    <asp:Literal ID="content" runat="server"></asp:Literal>
                </asp:Panel>
                <p class="sf_readMore">
                    <asp:HyperLink ID="fullContent2" runat="server">
                        <asp:Literal ID="Literal1" runat="server" Text="<%$Resources:FullStory %>"></asp:Literal>
                    </asp:HyperLink>
                </p>
                <p class="sf_postComments">
                    <asp:HyperLink ID="CommentsLink" runat="server" NavigateUrl="{0}#comments">
                        <asp:Literal Text="<%$Resources:Comments %>" runat="server"></asp:Literal>
                        (<asp:Label ID="CommentsCount" runat="server"></asp:Label>)
                    </asp:HyperLink>
                </p>
                <p class="sf_postAuthor">
                    <asp:Literal runat="server" Text="<%$Resources:Author %>"></asp:Literal>
                    <asp:HyperLink ID="postedBy" runat="server">
                        <asp:Literal ID="Author" runat="server"></asp:Literal>
                    </asp:HyperLink>
                </p>
                <p class="sf_postCategory">
                    <asp:Literal ID="CategoryLiteral" runat="server" Text="<%$Resources:Category %>" />: <asp:HyperLink ID="Category" runat="server" />
                </p>
                <p class="sf_postTags">
                     
                    <asp:Repeater ID="Tags" runat="server">
                    <HeaderTemplate>
                        <asp:Literal ID="TagsLiteral" runat="server" Text="<%$Resources:Tags %>" />
                    </HeaderTemplate>
                        <ItemTemplate>
                            <asp:HyperLink ID="tagLink" runat="server" />
                        </ItemTemplate>
                    </asp:Repeater>
                </p>
                <asp:Repeater ID="Bookmarks" runat="server">
                    <HeaderTemplate><ul class="sf_socialBookmarks"></HeaderTemplate>
                    <ItemTemplate>
                        <li>
                            <asp:HyperLink ID="BookmarkLink" runat="server">
                            <asp:Image ID="BookmarkImage" runat="server" />
                            </asp:HyperLink>
                        </li>
                    </ItemTemplate
                    <FooterTemplate></ul></FooterTemplate>
                </asp:Repeater>
            </li>
        </ItemTemplate>
        <FooterTemplate>
            </ul>
        </FooterTemplate>
    </asp:Repeater>


    Kind regards,
    Radoslav Georgiev
    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
2 posts, 0 answered