Skip to content
This repository was archived by the owner on Oct 18, 2018. It is now read-only.
This repository was archived by the owner on Oct 18, 2018. It is now read-only.

Expose the "Entry" entity object in the ViewPost control #11

@jeremy-jameson

Description

@jeremy-jameson

To allow greater flexibility in Subtext skins, the "Entry" object should be made available to skin controls that want to format the fields differently or show additional fields.

For example, in order to format my blog posts using the hAtom microformat (https://www.technologytoolbox.com/blog/jjameson/archive/2011/11/09/building-technologytoolbox-com-part-5.aspx), the custom skin I developed for Technology Toolbox specifies the following in ViewPost.ascx:

<div id="blogPost">
    <div class="hentry">
        <h2 class="entry-title"><%= Entry.Title %><asp:HyperLink runat="server" ID="TitleUrl" Visible="false" />
            <asp:HyperLink runat="server" ID="editLink" /></h2>
        <ul class="post-info">
            <li class="published"><span class="label">Published </span><span class="value"><%=
                Entry.DateSyndicated.ToString("MMMM d, yyyy") %></span><span class="label"> at </span>
                <span class="value"><%= Entry.DateSyndicated.ToString("t") %></span></li>
            <li class="vcard author">by <span class="fn"><%= Entry.Author %></span></li>
            <li class="comments<%= Entry.FeedBackCount == 0 ? " none" : string.Empty %>"><a href="#postComments">
                <span class="label">Comments: </span><span class="value count"><%= Entry.FeedBackCount %></span></a></li>
            <li class="categories">
                <uc1:PostCategoryList runat="server" ID="Categories" /></li>
        </ul>
        <div class="entry-content">
            <asp:Literal ID="Body" runat="server" />
        </div>
        <div class="attachment" <%= (Entry.Enclosure == null
                || Entry.Enclosure.ShowWithPost == false) ? "style='display: none'" : "" %>>
            <h3>Attachment</h3>
            <p><asp:Label runat="server" ID="Enclosure" DisplaySize="true" /></p>
        </div>
    </div>
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions