My.ADVISOR.com Sign-In
ID
Password

Member Center / Sign-Up
Go to Article
Advanced Search 

ADVISOR TIPS

Theme-ing with Microsoft SharePoint Content Editor Web Part

This tip uses the CEWP, a custom style sheet, and a document library to easily modify and maintain the site's look and feel.

Compiled by Darrin Bishop, technical editor

 
Figure 1: Creating a new look and feel using the CEWP -- This site uses a hidden Content Editor Web Part to change the template's look and feel.

The Content Editor Web Part (CEWP) is a versatile Web Part that installs with Windows SharePoint Services and SharePoint Portal Server 2003. I use the Content Editor Web Part to give a group of clients that I host a choice of colors to choose as a "template". This tip uses the CEWP, a custom style sheet, and a document library to easily modify and maintain the site's look and feel.

 
Various styles located in common cascading style sheets control much of the look and feel of a portal area or WSS site. In the current version of the Microsoft SharePoint Products and Technologies 2003 SDK, you can find a comprehensive list of styles that SharePoint Portal Server 2003 and Windows SharePoint Services 2.0 use. To modify a site's look and feel, start by using your favorite style sheet editor to create a cascading style sheet that will contain the new style values:
 
<style>
   .ms-navframe{  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0274CC',  endColorstr='#FFFFFF',     gradientType='0')}
</style>
 
<style>
.ms-navwatermark{ display: none; }
</style>
 
<style>
.ms-bannerframe{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0274CC', endColorstr='#FFFFFF', gradientType='1')}
</style>
 
<style>
#onetidPortalConn{ display: none; }
</style>

Save the style sheet as a txt or css file, for example BlueStyleSheet.txt. Upload this to a document library. I recommend you create a special document library in which to store these custom files. Users will need read access to the style sheets, so be sure users have at least read access to the document library.
 
Now add Content Editor Web Part on the page you wish to modify. Place a link to the new style sheet into the Content Link property of the new Web Part. To avoid displaying the Content Editor Web Part, you can uncheck the "Is Visible" property in the tool pane. This will include the content in the page but not display any visible information such as the Web Part chrome or comments. Figure 1 displays the new look and feel created by the styles referenced by the Content Editor Web Part.
 
In figure 2, notice that the following areas have changed as a direct result of the style information referenced by the hidden Content Editor Web Part now incorporated in the page:

  • The Quick Launch bar and the top banner now has a fade away effect.
  • The Quick Launch watermark is gone and the "Up To" link has also been removed.

Creating various style sheets and placing them in the same document library is a quick and easy way to create a new look and feel across your sites.
 
-- Bob Fox, Lawrenceville, New Jersey
 

This Advisor Tip was originally published in the May/June 2006 issue of Advisor Guide to Microsoft SharePoint. Subscribers can get more Advisor Tips and how-to advice on succeeding with Microsoft SharePoint technology at MSSharepoint.AdvisorGuide.com. 

What do YOU think about this topic? Share your advice and thoughts using this form.

Your Name

REQUIRED : PUBLIC

Your E-Mail

REQUIRED : PRIVATE

Job, Company

OPTIONAL : PUBLIC

City, State, Country

OPTIONAL : PUBLIC

Your Web Site

OPTIONAL : PUBLIC

Your Comment

Please help everyone by keeping your comments on-topic, using clean language, and not defaming or making personal attacks.


Your e-mail address is required, but it will not be displayed to the public or given to anyone. See our Privacy Policy. Comments become visible after they pass our spam filter, and spammers and abusers are permanently blocked. Please report spam or abuse.

Darrin Bishop is a product evangelist for KnowledgeLake, a St. Louis-based Microsoft Gold Partner focusing on SharePoint Technologies, ECM, document imaging, and workflow. He is the author of "The Rational Guide to Building SharePoint Web Parts." Darrin has been working with SharePoint Technologies since the release of SharePoint Portal Server 2001. http://www.knowledgelake.com

Printer-friendly
page layout

Keyword Tags: Microsoft, Microsoft SharePoint, Microsoft SharePoint Portal Server, Microsoft Windows Server

ADVISORAMA
People who live in glass houses should buy shades.

ARTICLE INFO

DataBased Advisor

Web Edition: 2006 Week 16, Doc #17881

Print Edition: May/June 2006, Page 70

FREE ACCESS FREE ACCESS

SUBSCRIPTION STATUS
You are not signed-in. If you are a subscriber to this publication, sign-in above to access locked articles. To subscribe or renew go to www.AdvisorStore.com.

Subscribe to DATABASED.ADVISOR.com

Get it all -- every current and past ADVISOR tech/business publication, now all-in-one subscription, with new articles and a huge reference library packed with expert advice, how-to and downloads. Subscribe now to get it all.

DataBased.Advisor.com

Subscribe to FileMaker Advisor Magazine

Read the advanced guide to creating custom business database solutions with FileMaker software. Subscribe now to gain access to all the archives and downloads.

FileMaker.Advisor.com

Subscribe to Advisor Basics of FileMaker Pro

Learn the fundamentals of using FileMaker Pro software. Every issue gives you step-by-step instructions on creating the databases you need. Subscribe now!

FileMaker.AdvisorBasics.com

Showcase Your Smarts

Submit your tips, techniques and advice and let Advisor promote your business and build your career. Show the world what you know!

AdvisorTips.com

Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
Portions copyright ©1983-2008 Advisor Media, Inc. All Rights Reserved.
Reuse or reproduction of any portion or quantity of Advisor Media's copyrighted content, in any form, for any purpose, requires written permission.
ADVISOR®, the ADVISOR logo, and other names and logos that incorporate ADVISOR are registered trademarks, trademarks or service marks of Advisor Media, Inc. in the United States and/or other countries.
Other trademarks are used for identification, editorial or descriptive purposes and are the property of their owners.
Hosted by Prominic.NET Website powered by
LOTUS SOFTWARE
BISHD04-07 posted 02/27/2007 modified 01/09/2009 03:35:46 AM ztdbms/ztdbms
domino-144.advisor.com my.advisor.com 01/09/2009 03:25:45 PM