Intranet Journal   Earthweb  
Events Jobs Premium Services Media Kit Network Map E-mail Offers Vendor Solutions Webcasts

   Intranet Journal Subjects
Search Earthweb

Privacy Policy



internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

internet commerce
Be a Commerce Partner
















 

[ Home | Discussion Forum | How Do I... | Lotus Notes Intranets | Microsoft SharePoint | Products | Shopping  ]

free news!


Using a Custom Web Page Template for Easy Content Entry


Paul Schaeflein
8/4/2005

Printer Friendly Version

In the last few articles of this series, I discussed using the content editor Web Part to allow end-users to post content to an intranet site. The Web Part pages are stored in a content library, and I showed a custom web part that can be used to provide a Quick Launch feature. (For an alternative to a custom Web Part, read the article from Ian Morrish on his WSS Demo Web site.)

This month, I will wrap up these tips along with information from Microsoft to provide custom Web Part page templates that provide easy content entry.

The custom page templates that I am building are based on a technical article (and download) on MSDN. This article reviews the steps required to program a new Web Part page creation form. I will not repeat those steps here — please read and understand that article before making the changes I detail in this article.

The files used in this article are available for download from my Weblog.

Custom Templates

In my "easy end-user content management" scenario, I have identified three different Web Part page templates that could be used:

  • Content page with Quick Launch
  • Two-column web part page with Quick Launch
  • Content-only page

The content page with Quick Launch is the similar to the page that was built in last month's article. The page contains a Content Editor Web Part that fills most of the page, and the Document Library Quick Launch on the left side. The left column is shaded light blue, like the default WSS home page. The second template contains two Web Part zones instead of the Content Editor Web Part. The third template is similar to the first, but the left side is left blank. The images below should help illustrate the templates.

Content page with Quick Launch Two-column Web Part page with Quick Launch Content-only page

These images will be used on the custom Web Part page creation form to help the end-users with the template selection.

Customizing the Templates

The custom templates for this article have specific Web Parts included. The Document Library Quick Launch requires some special coding, since it is not one of the built-in SharePoint Web Parts.

The EUCcustom1.aspx and EUCcustom2.aspx files in the download have the web part declared as part of the <@Register> tag.

<%@ Register TagPrefix="WpNs0" Namespace="Schaeflein.SharePoint"
      Assembly="DocLibQuickLaunch, Version=1.0.0.0, 
      Culture=neutral, PublicKeyToken=0c208cdb9527b8c1" %>

The templates have the corresponding tag for the Web Part at the appropriate place in the layout. (Some properties omitted for readability.)

<WebPartPages:WebPartZone runat="server" Title="loc:LeftNav" ID="LeftNav">>
  <WpNs0:QuickLaunchWP runat="server" WebPart="true" 
      __     WebPartId="{2C963000-73E2-48E4-8256-36FF7D0D9DC7}" >
    <WebPart xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
             xmlns="http://schemas.microsoft.com/WebPart/v2">
      <Title>DocLib Quick Launch</Title>
      <FrameType>None</FrameType>
      <Description>Navigation part based on contents of Document 
             library</Description>
      <IsIncluded>true</IsIncluded>
      <PartOrder>1</PartOrder>
      <FrameState>Normal</FrameState>
      <Height />
      <Width />
      <AllowRemove>true</AllowRemove>
      <AllowZoneChange>true</AllowZoneChange>
      <AllowMinimize>true</AllowMinimize>
      <IsVisible>true</IsVisible>
      <DocumentLibrary xmlns="Schaeflein.SharePoint.QuickLaunch" />
    </WebPart>
  </WpNs0:QuickLaunchWP>
</WebPartPages:WebPartZone>

Customizing the Create Page

In my SharePoint installation, I followed the recommended practice of using a different create form for the custom templates. The limitations identified in Microsoft's Technical Article apply to this installation type, so be sure that you understand those limitations. The create form has a select box that displays all of the custom templates. The create form from the Microsoft Technical Article uses different names for the templates, so the following tags were changed in my solution:

<OPTION value="EUCcustom1" selected="true">
     Content page with DocLib QuickLauch navigation </OPTION>
<OPTION value="EUCcustom2">Two-column WebPart page with 
     DocLibLBB QuickLaunch</OPTION>
<OPTION value="EUCcustom3">Content only</OPTION>

Lastly, the create.aspx file is modified to include a link to the custom create form. Be sure to create a backup of this page. It is possible that future service packs from Microsoft will overwrite custom changes to this file. The Technical Article has the steps necessary for this change. On my Create page, the link is titled Custom Web Part Page. I also included a reminder in red text.

Putting It All Together

Once the templates and Web Part are installed, content entry by end-users is much easier. End-users perform the following steps:

  • Click Create in the top navigation bar
  • On the Create Page, click the link created for the custom create form

  • Complete the form as necessary

  • After the page is created, it is displayed. The Web Parts are included and ready for content

Content Entry Solution

This month's article concludes the Content Entry solution. The goal of this solution is to help end-users post content to a SharePoint site with minimal technical assistance. Please visit the Intranet Journal discussion forum to discuss the solution, or for help troubleshooting any errors.

About this series
This series of articles on SharePoint is intended to help you understand the capabilities of the product, as well as provide tips and tricks, development ideas, information from Microsoft, information from the community, and perhaps some samples. Like many other series on IntranetJournal.com, I plan to include how-to articles that can help you with your deployments — ways to customize a page; deployment scenarios; content management; etc. With such a diverse product, there is no lack of topics for this series of articles. What would you like to read?

About the author
Paul Schaeflein is a developer with more than 20 years experience. Paul has been developing dynamic and interactive Web sites since 1996. Paul has worked on all of the versions of SharePoint and has worked with the .NET framework since its debut. You can reach Paul through his blog at http://www.schaeflein.net/blog/.



Printer Friendly Version

Of Interest
Intranet Discussion Forum
Sharepoint Series Home Page
Enabling Users to Maintain SharePoint Content
Customizing the Quick Launch in a WSS Team Site

email this page

Tutorials
and more at:
Intranet Journal's Tutorials
Intranet Journal Favorites

Creating a PHP-Based Content Management System

The Spyware Guide

Introduction to Microsoft SharePoint Portal

Intranet Journal
Part of the EarthWeb Network

Managing Editor
Intranet Journal

Tom Dunlap

EarthWeb Home Page
Jupitermedia Home Page

Media Kit




The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers