How to add files to a document library in a site definition in SharePoint 2007?
Posted
by jaloplo
on Stack Overflow
See other posts from Stack Overflow
or by jaloplo
Published on 2010-04-07T15:52:37Z
Indexed on
2010/04/07
15:53 UTC
Read the original article
Hit count: 245
sharepoint2007
|site-definition
Hi all,
I'm doing a site definition for SharePoint 2007. When the site is created, a document library called "Folder2" is created also. Now, I need to add some documents to this document library and appear as items in the document library standard views.
My code is:
<Lists>
<List FeatureId="00bfea71-e717-4e80-aa17-d0c71b360101" Type="101" Title="Folder2" Url="Folder2">
<Data>
<Rows>
<Row>
<Field Name="Name">MyFile.txt</Field>
<Field Name="Title">MyFile.txt</Field>
<Field Name="FileLeafRef">MyFile.txt</Field>
</Row>
</Rows>
</Data>
</List>
</Lists>
When I see the items of the Document Library there is one element with title "1_". Does anybody know how to add files in a site definition?
The onet.xml I used is the same as blank site.
Thanks!!!
© Stack Overflow or respective owner