I was working a new control for the [bundle] and was in need of a condition control within [csl] that didn't appear to exist. What I needed was a condition control that checked against a WeblogPost's ExtendedAttributes. What I came up with was the "PostExtendedAttributeComparison."

I use this comparison as follows:

<CSControl:ConditionalContent runat="server">
        <SK:PostExtendedAttributeComparison runat="server" ExtendedAttribute="AuthorEmail" Operator="IsSetOrTrue" />                                        
        <SK:PostGravatar runat="server" Rating="R" ExtendedAttribute="AuthorEmail" Width="80" BorderWidth="1" />
       <SK:Identicon ID="Identicon1" runat="server" width="80" BorderWidth="1" Text="identicon"  />                                      

This checks to see if the extended attribute "AuthorEmail" is set in the blog comment. If it is set, then we will show the person's Gravatar, otherwise we will show the Identicon.

The WeblogPostFeedbackExtendedAttributeComparison control can be found in the [bundle]. Remember to register the control as:

<%@ Register TagPrefix="SKB" Namespace="CarKnee.CS.Bundle.Blogs.Controls" Assembly="CarKnee.CS.Bundle" %>

Related Articles:

Comments (3) -

Ben Tiedt

I tried to download the CarKnee Bundle but I keep getting a corrupt ZIP file.  Is HTTPCompression enabled on ASPX pages on your site?  That will corrupt ZIP files being served from the file gallery.

Sean Kearney

I was aware of the possibility that compression could kill zip's, but nobody ever compained for my site!

I have now disabled it for .aspx and you should be good to go.


Ben Tiedt

Much better!  Thanks!

Comments are closed