Search code examples
asp.netskinsubtext

How to get nicely formatted comment count and date for a blog post in subtext


I'm creating my own skin for subtext, and there's one thing I can't figure out... How can I get the post date (with permalink) and comment count link to the posts comments formatted how I want?

In the base skin, there's this:

<asp:literal id="PostDesc" runat="server" />

That generates something like this: posted @ Thursday, July 29, 2010 2:13 AM | Feedback (0)

How do I get this to look like something Phill Haack has on his site (http://haacked.com)?


Solution

  • Found out after excruciating hours of research, trial and error, and browsing subtext source code.

    <asp:HyperLink runat="server" NavigateUrl='<%#string.Format("{0}#feedback", Url.EntryUrl((IEntryIdentity)Container.DataItem)) %>'>View comments (<%#Eval("FeedBackCount") %>)</asp:HyperLink>
    

    For comment count, and I will do something similar with date.