More in this section

Forums / Developing with Sitefinity / Retrieve the current Blog Post's Title

Retrieve the current Blog Post's Title

2 posts, 0 answered
  1. Tony
    Tony avatar
    23 posts
    Registered:
    12 Sep 2008
    05 Apr 2009
    Link to this post
    I have an interesting project which requires that the blog post title be multi-colored.  The first word is one color the rest are another.

    I have been struggling to find a way to pull the title into the server side so I can monkey with it before spitting back out into the template.

    <div class="boxstyle1-upper"
                    <h3><span class="red"><asp:HyperLink ID="fullContent1" runat="server"
                        <asp:Literal ID="Title" runat="server"></asp:Literal> 
                    </asp:HyperLink></span><asp:Literal ID="GreyTitle" runat="server"><span></span></h3> 
                </div> 

    I won't bother showing the server side code I am trying because I don't feel I even have a fix on the object model.

    The only examples I've seen iterate through ALL posts, which doesn't help me.

    (I am modifying the ContentViewItemList.ascx template to try to accomplish this)
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    06 Apr 2009
    Link to this post
    Hello Tony,

    There are two ways that I think can be used in this case. The first one is using manager.GetContent(int from, int max);, and the second one is creating a filter expression. Using filter expression you can get more than one tile.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
2 posts, 0 answered