Creating a Custom SharePoint 2007 List Definition

本文介绍如何创建自定义的SharePoint 2007列表定义及站点列,包括定义站点列属性、激活特性、配置列表模板等步骤。

Creating a Custom SharePoint 2007 List Definition

Creating a custom site column for the submission comments

1. Create a folder named SubmissionColumns in the C:"Program Files"Common Files"Microsoft Shared"web server extensions"12"TEMPLATE"FEATURES (FEATURES) directory.

2. Create an xml file named feature.xml inside this folder that contains the following information:

<?xmlversion="1.0"encoding="utf-8" ?>
<Feature
    Id="{a94f84a5-c87a-4fef-8e01-f064bc1bd9d7}" 
   
Title="Submission Columns"

 Description="This feature contains site columns used in the submission process"

 Version="12.0.0.0"

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

 <ElementManifests>

     <ElementManifestLocation="submissioncolumn.xml" />

 </ElementManifests>

</Feature >

3. Create a xml file named submissioncolumn.xml that contains the following information:

<Elementsxmlns="http://schemas.microsoft.com/sharepoint/">

    <FieldID="{374e02cc-fe2e-4247-8762-e69242f9ff94}"

        Name="SubmissionComments"
       
SourceID="http://schemas.microsoft.com/sharepoint/v3"

        StaticName="SubmissionComments"

        Group="Submission Columns"

        Type="Note"

        DisplayName="Comments"

        Sortable="FALSE"

        Description="Comments on the submission"

        Sealed="TRUE"

        UnlimitedLengthInDocumentLibrary="TRUE"

        AllowDeletion="TRUE"

        ShowInFileDlg="FALSE">

    </Field>

</Elements>

Here we are defining the system name (Name and StaticName) the base type (Type) and several other attributes of our site column. The FEATURES"fields folder contains examples of default site columns, and is useful in understanding how all these attributes are used.

4. Activate the feature using the following commands (in a command window, from the C:"Program Files"Common Files"Microsoft Shared"web server extensions"12"BIN directory):

stsadm -o installfeature -filename SubmissionColumns"feature.xml -force
stsadm -o activatefeature -filename SubmissionColumns"feature.xml -url http://localhost


Creating a custom submission list definition

1. Create a folder named SubmissionsList in the FEATURES directory.

2. Create a xml file named feature.xml that contains the following information:

<?xmlversion="1.0"encoding="utf-8" ?>
<Feature 
   
Id="{6d2c42db-782c-417e-9c7c-2c941ef52b92}"
   Title="Submission List"
   Description="This feature contains a submission list definition"
   Version="12.0.0.0"
   Scope="Site"
    xmlns="http://schemas.microsoft.com/sharepoint/">
    <ElementManifests>
        <ElementManifest Location="ListTemplate"Submissions.xml" />
    </ElementManifests>
</Feature>

3. Create a folder named ListTemplate inside the SubmissionsList folder and add an xml file named Submissions.xml that contains the following information:

<?xmlversion="1.0"encoding="utf-8"?>

<Elementsxmlns="http://schemas.microsoft.com/sharepoint/">

    <ListTemplate

          Name="Submissions"

          Type="6500"

          BaseType="0"

          OnQuickLaunch="TRUE"

          SecurityBits="11"

          Sequence="360"

          DisplayName="Submissions"

          Description="Create a submissions list when you want to allow users to submit submissions on a document"
   
      Image="/_layouts/images/itgen.gif" />

</Elements>

Here we are defining a unique type number for our list (which can be used if we want to include this list in a custom site definition), the sequence it should appear in the ‘create’ page and other basic attributes. Note the displayname used must match the folder that contains the list schema defined in the next step.

4. Create a folder named Submissions inside the SubmissionsList folder and copy the FEATURES"CustomList"CustList"Schema.xml file into the Submissions folder.

5. Update the ContentTypes element in the Schema.xml file to the following:

<ContentTypes>
   
<ContentTypeRefID="0x01AB">
        <FolderTargetName="Submission" />
    </ContentTypeRef>
    <ContentTypeRefID="0x0120" />
</ContentTypes>

Here we define our custom ‘submission’ content type as the base type for this list. The columns defined in this content type are then shown on the ‘add new item’ page.

6. Update the Fields element in the Schema.xml file to the following:

<Fields>

    <Field

        Name="Title"

        ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}"

        DisplayName="Title"

        Sealed="TRUE"

        SourceID="http://schemas.microsoft.com/sharepoint/v3"

        StaticName="Title">                      

    </Field>

    <Field

        ID="{475c2610-c157-4b91-9e2d-6855031b3538}"

        Name="FullName"

        DisplayName="$Resources:core,Full_Name;"

        Type="Text"

        SourceID="http://schemas.microsoft.com/sharepoint/v3"

        StaticName="FullName">                   

    </Field>

    <Field

        ID="{fce16b4c-fe53-4793-aaab-b4892e736d15}"

        Name="Email"

        DisplayName="$Resources:core,E-mail_Address;"

        Type="Text"

        SourceID="http://schemas.microsoft.com/sharepoint/v3"

        StaticName="Email">                      

    </Field>

    <FieldID="{374e02cc-fe2e-4247-8762-e69242f9ff94}"

        Name="SubmissionComments"

        SourceID="http://schemas.microsoft.com/sharepoint/v3"

        StaticName="SubmissionComments"

        Group="Submission Columns"

        Type="Note"

        DisplayName="Comments"

        Sortable="FALSE"

        Description="Comments on the submission"

        Sealed="TRUE"

        UnlimitedLengthInDocumentLibrary="TRUE"

        AllowDeletion="TRUE"

        ShowInFileDlg="FALSE">

    </Field>

</Fields>

Here we define the custom fields from our content type that we want to use in our list.

7. Lastly update the ViewFields element to contain the columns we want to display on our default list view:

<ViewFields>

    <FieldRefName="Attachments">

    </FieldRef>

    <FieldRefName="LinkTitle">

    </FieldRef>

    <FieldRefName="FullName">

    </FieldRef>

    <FieldRefName="Email">

    </FieldRef>

    <FieldRefName="SubmissionComments">

    </FieldRef>

</ViewFields>

8. Activate the feature using the following commands:

stsadm -o installfeature -filename SubmissionList"feature.xml -force
stsadm -o activatefeature -filename SubmissionList"feature.xml -url http://localhost
iisreset

## 关于《Creating a custom bootable ISO with mkisofs》文档的来源说明 你提到的第一项资料: > **[Creating a custom bootable ISO with mkisofs (Linux From Scratch)](https://www.linuxfromscratch.org/hints/downloads/files/creating-bootable-cdrom.pdf)** 是来自 **Linux From Scratch(LFS)** 项目的官方“Hints”系统中的一篇技术文档。 --- ### 🌐 官方网址: 该文档的原始地址为: 👉 [https://www.linuxfromscratch.org/hints/downloads/files/creating-bootable-cdrom.pdf](https://www.linuxfromscratch.org/hints/downloads/files/creating-bootable-cdrom.pdf) --- ### 🔍 项目背景介绍 - **Linux From Scratch(LFS)** 是一个开源项目,旨在指导用户如何从源代码构建一个完整的 Linux 系统。 - 它提供了一系列书籍和指南,帮助开发者理解操作系统内部结构。 - **Hints** 是该项目的一个补充资源库,包含由社区成员撰写的附加技巧、脚本和实践方法。 --- ### 📄 文档内容简要 该 PDF 文档主要介绍如何使用以下工具和技术创建一个可启动的 ISO 镜像: - `mkisofs`:用于将文件系统打包成 ISO 9660 标准格式 - `isolinux`:Syslinux 的 CD/DVD 版本,用于实现 BIOS 启动支持 - 文件结构组织:包括内核镜像、initrd、引导配置文件等 - 制作最小化可启动光盘的过程 这与你提出的流程非常相似,尤其是涉及手动构建文件结构并最终生成 ISO 的过程。 --- ### 💡 建议访问方式 你可以直接复制粘贴以下链接在浏览器中打开: 🔗 [https://www.linuxfromscratch.org/hints/downloads/files/creating-bootable-cdrom.pdf](https://www.linuxfromscratch.org/hints/downloads/files/creating-bootable-cdrom.pdf) 如果你无法访问该链接,也可以尝试使用如下镜像站点或搜索关键词: ``` site:linuxfromscratch.org creating-bootable-cdrom.pdf ``` --- ### ✅ 小结 | 信息 | 内容 | |------|------| | 文档名称 | Creating a Custom Bootable CD-ROM | | 来源网站 | Linux From Scratch (LFS) Hints 系统 | | URL 地址 | https://www.linuxfromscratch.org/hints/downloads/files/creating-bootable-cdrom.pdf | | 适用对象 | 自定义 ISO 构建者、Linux 系统开发人员、自动化部署工程师 | --- 如需我帮你下载该 PDF 或提取其中关键步骤内容,请随时告诉我。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值