I feel bad, have not blogged for a while now; to friggin busy it seems.

Anyway, I found quite a nice little "trick" the other day when looking at a CMS 2002 migration to MOSS 2007. Previously the all pages of a certain type had the contact details of the person who was responsible for the information on the page as indiviual controls:

  • Name of Person
  • Telephone of Person
  • Email Address of Person

Authors had to type these details in individually, so I thought to myself "there has to be a way to include user profile information, where the author can use the people picker like in a nomal list item"; not so easy to find it seems.

To cut a long stroy short what I did to include the people picker on the layout page was to do the following:

  • Added a new column to the relevant page content type which was a user/group column: lets call it "ContactPicker"
  • Opened the layout page in my favorite editor (notepad hehe) and added the following piece of code: <SharePoint:UserField id="1234" FieldName="ContactPicker" runat="server" />
  • And bobs your uncle, authors are now able to select a user and viewers are able to see the contact details for the page (which get updated from AD / FBA).

What is interesting is that I have yet benn unable to find any documentation around using the <SharePoint controls in a layout page, everyting points to using the <PublishingWebControls, there are a bunch that you could use - if anyone out there has more clarification, please share :) The way I worked it out was: "hey, lets try this".


Doug "BobTheBuilder" McCusker