Kit Kai's Tech Blog

Blog about SharePoint

This Blog

Syndication

Search

Tags

News



  • Want to be notified when new posts are available? Click the icon below for more information on how to subscribe.

    Blog Flux MapStats: Stats and Counter for Kit Kai's Tech Blog Subscribe to Kit Kai's Tech Blog

    Locations of visitors to this page Add to Technorati Favorites

Community

Email Notifications

Archives

Sharepoint / CMS Blogs

MVPs', Leads' & RDs' Blogs

Singapore Usergroups

Overseas Usergroups

About Me

Customising Wiki Pages - Part 3
 

Let's start getting our hands dirty

Now that we have establish that the content are stored in the fields, let's look at what wkpstd.aspx, and start customising.

 

 

 

When you put the standard wiki page into edit mode, you will see that there is only a single webpartzone at the bottom of the page. At the end of Part 3, we will be adding a new webpartzone on the right hand side of the page.

 

From the windows explorer, navigate to "program files\common files\microsoft shared\web server extension\12\template\documenttemplates" and open up wkpstd.aspx with your favourite html editor. For me, it is visual studio. At line 31, you will see "asp:content contentplaceholderid=PlaceHolderMain". In this place holder, "SharePoint:FormField FieldName=WikiField" display the content of the wiki page. 

 

 

 

The next control, "SharePoint:ListFieldIterator" displays the rest of the fields that are in the list. Meaning, if you add a new field, say "Featured" of type boolean, you will see a checkbox with the text "Featured" after the wiki content. But if you put the Featured field into the ExcludeFields attribute, the checkbox won't appear. Cool? I think it is...

 

Now that we understand the basic components that page up wkpstd.aspx, let's add in the right webpartzone. We do that by adding a table to have two column layout, and add the zone on the right column. Codes in blue are new codes

 

<table cellpadding="0" cellspacing="0" border="0" Width="100%" class="ms-descriptiontext">

<tr valign="top">

<td>

<SharePoint:FormField FieldName="WikiField" ControlMode="Display" runat="server" />

<table cellpadding="0" cellpadding="0" border="0">

<tr>

<td>

<table class="ms-formtable" border="0" cellpadding="0" id="formTbl" cellspacing="0" width="100%">

<SharePoint:ListFieldIterator ControlMode="Display" TemplateName="WideFieldListIterator"

ExcludeFields="FileLeafRef;#WikiField;#Featured;#Category" runat="server" />

</table>

</td>

</tr>

</table>

</td>

<td>

<WebPartPages:WebPartZone runat="server" FrameType="None" ID="Right" Title="loc:Right"></WebPartPages:WebPartZone>

</td>

</tr>

</table>

 

 

 

Save the page, and create a new wiki page. Next place the new page in edit mode, and you will soon see the new webpartzone on the right. Existing pages have the new webpartzone too. But do note that the changes effect every wiki page on the server. Enjoy1

 

Published Sunday, February 25, 2007 5:04 PM by kitkai
Filed under:

Comments

# Customising Wiki Pages - Part 2@ Sunday, February 25, 2007 5:11 PM

Dissecting Wiki PagesLet&amp;#39;s start by first finding out where the information is stored. Hint to where

# Series on Customising Wiki Pages@ Sunday, February 25, 2007 5:12 PM

Wiki is something new in SharePoint 2007. And as most new functionality in Microsoft, wiki is still very

# re: Customising Wiki Pages - Part 3@ Wednesday, February 28, 2007 3:54 AM

Have you used the ListFieldIterator declaritively with a control mode of New or Edit? The data does not successfully update for me when I do this.

# re: Customising Wiki Pages - Part 3@ Tuesday, March 27, 2007 4:14 AM

I'd be interested in seeing how you'd inherit from and extend the built-in wiki functionality, rather than 'breaking' the standard install?