CS Nuglet: Extending master.Master

The more I work with Ben Tiedt’s excellent Community Server Chameleon architecture for controlling page display the more I groove on it.  I can’t believe the guy uses a MacBook…

Anyway, here’s a nuglet describing how I extended the Community Server Master.master file on a client site over the weekend to control its output based on the application.

Let’s say you have a footer that you only want to show on all site areas except the forums area.  Rather than creating a new common/.Master page for forums, extend it using Chameleon Intelligence.

 

<asp:ContentPlaceHolder ID=”footerContent” runat=”server”>
    <CSControl:Placeholder runat=”server” Tag=”Div”>
        <DisplayConditions Operator=”NOT”>
                <CSControl:ApplicationPropertyValueComparison
                        ApplicationType=”forum” Operator=”EqualTo” runat=”server” />
        </DisplayConditions>
     <ContentTemplate>

 

This displays the content on all Community Server areas except Forums.  Neato.

Article written by

A long time developer, I was an early adopter of Linux in the mid-90's for a few years until I entered corporate environments and worked with Microsoft technologies like ASP, then .NET. In 2008 I released Sueetie, an Online Community Platform built in .NET. In late 2012 I returned to my Linux roots and locked in on Java development. Much of my work is available on GitHub.