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

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

Open
jeremy-jameson opened this issue Jan 31, 2012 · 0 comments
Open

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

jeremy-jameson opened this issue Jan 31, 2012 · 0 comments

Comments

@jeremy-jameson
Copy link

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>
jeremy-jameson referenced this issue in technology-toolbox/Subtext Jan 31, 2012
…at it is available to skin controls that want to format the fields differently or show additional fields)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant