in

Platinum Bay

Peace, Love and Visual Studio Team System

.NETicated

Hacking Community Server: Editable Footer

I have completed the aesthetic upgrades to my site that I could with the new Chameleon interface in Community Server 2007. Now it is time to do the fun stuff. One of the things I wanted to do was make the footer area an editable content area, but I didn't want to have to modify the Themes/[theme]/Common/master.Master file every time, like for copyright date changes.

In Community Server, there is a built in control just for this purpose. It is called a ContentPart control, and it is located in the CommunityServer.Controls assembly. There is no need to dive into Reflector, however. All that is required is adding a couple additional tags to a theme file where you want the editable content to live.

First, to the BodyFooterRegion ContentPlaceHolder control, which serves up the "Powered by Community Server" image seen below, I added style="float: right;" to keep it out of the way of my content.

Then, below the ContentPlaceHolder, I added the following tags and controls:

<div style="width: 650px;">
     <CSControl:ContentPart ID="ContentPart1" runat="server" ContentCssClass="CommonContentPartBorderOff"
         ContentHoverCssClass="CommonContentPartBorderOn" ContentName="footer-default">
         <DefaultContentTemplate>
            
<!-- Default Content Here -->
         </DefaultContentTemplate>
     </CSControl:ContentPart>
</
div>

One important note: Make sure you assign a unique ContentName to each ContentPart.  The names already taken by Community Server, that I am aware of, are welcome-default and featured-default.

And that's it for the editable footer. Now all that remains is to double-click on the footer and edit to your heart's content.

 

Comments

No Comments

Leave a Comment

(required )  
(optional )
(required )  
Add

About Steve

Steve Andrews has been working as a developer for more than 8 years. During this time, he has designed and developed applications in such widely varying areas as trust accounting, medical information management, supply chain management, and retail systems. He has firsthand developer experience with a variety of languages, including Java, VB, and .NET. Most recently, he has been immersed in SharePoint. He is currently employed at RDA Corporation in Philadelphia, PA, as a Software Engineer and a team member in the Architectural Guidance evangelism team. Steve is also an MTCS (x2), ICSOO, and .NET fanatic.
Powered by Community Server (Commercial Edition), by Telligent Systems
© Platinum Bay | Some Rights Reserved Creative Commons License

Disclaimer: The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or annonymous comments) - so keep it polite, please.