Geeks With Blogs

News

Hello,
My name is David Jacobus I am a former teacher of Computer Science and Mathematics, who is now working full time as a SharePoint Consultant! I have raced off-road motorcycles for 30+ years! I have fallen in love with Glamis and the Dune experience the last few years! My friends like to say: Jake, with age comes the cage! I suppose that is because at Glamis I use a Razor XP 900! Which has a full roll cage!


David Jacobus SharePoint Consultant

List Definitions Using SharePoint Solutions Generator 2008

1. Start SharePoint Solutions Generator

a. Create List Definition

clip_image002

clip_image004

clip_image006

b. The two custom lists are Internal Contact (Custom list) and Tasks (Custom View)

c. Hit defaults’ to finish

d. VS 2008 Solutions Generator will provide a link to the generated solution

clip_image008

2. Create two Feature folders in the WSPBuilder Solution

a. Tasks

b. InternalContacts

clip_image010

3. Copy the two folders created by the Solutions Generator into these folders

clip_image012

4. Notice the custom view in the tasks list definition

a. In addition, The ListDefinition.xml file.

b. We will use this to create the feature so:

i. Move this to the next folder up on both lists

clip_image014

5. Next we will create the feature files

a. Add a new xml file to the feature folder on both lists

clip_image016

b. Copy the following xml into the file:

<?xml version="1.0"?>

<Feature Id="{770CB6F9-FC52-4041-872E-83E9685B2F7A}"

Title="Internal Contacts"

Description=""

Version="1.0.0.0"

Scope="Web"

ImageUrl="ABCteamSite/company1.jpg"

xmlns="http://schemas.microsoft.com/sharepoint/">

<ElementManifests>

<ElementManifest Location="ListDefinition.xml" />

</ElementManifests>

</Feature>

clip_image018

c. Do the same for the Tasks list

d. Be sure to change the GUID on the list feature

e. The image should be the same but with a different number for each feature.

i. I use a small transparent gif of the company logo

ii. If I have 10 features I will have 10 images the same just numbered sequentially

iii. The reason is if someone deactivates a feature all the other features will show with a broken image if they all use the same image (Experience)

6. The List definition File will be the same that was created by the Solution generator

clip_image020

clip_image022

7. The real workhorse of the list definition is the schema.xml file and is beyond the scope of this blog entry!

8. Now we need to create list instance features for each list in the site:

a. 6 lists

i. Tasks

ii. Internal Contacts

iii. Calendar

iv. Links

v. Announcements

vi. Team Discussions

b. They will all be similar so a copy and paste would be appropriate

c. The custom lists instances will have their feature GUID exposed in their elements.xml file while list instance based upon built in list templates will reference the built in feature GUIDS.

d. Custom Lists (Tasks)

9. Built-in List (Announcements)

clip_image024

clip_image026

a. Notice the feature ID in the list instance reflects a built-in List feature ID: 0BFEA71-D1CE-42de-9C63-A44004CE0104

b. They are all the same until the last three digits in this case 104

10. Custom List Internal Contacts List template feature

clip_image028

clip_image030

a. Notice that the list instance points to the same feature as the list template

Posted on Monday, October 27, 2008 3:32 PM | Back to top


Comments on this post: SharePoint 2007 Site Definitions Part 3

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © David Jacobus | Powered by: GeeksWithBlogs.net