in

Platinum Bay

Peace, Love, and...

This Blog

Syndication


.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 is an independent consultant, INETA speaker, and Microsoft MVP for Visual Studio ALM. He has been working in technology for over ten years focusing on custom application development and Application Lifecycle Management. Steve is also Microsoft and IBM certified and a community fanatic having led sessions at nearly 100 events across North America. When he's not developing software solutions or engaging with the community about software technology, Steve is a closet singer and songwriter and plays the guitar and keys. Occasionally, Steve even gets to sleep. Occasionally.
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.