Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Pre-populating a document library in wss v3, via onet.xml is this possible

  Asked By: Fredrick    Date: May 06    Category: Sharepoint    Views: 2232

I am using wss v3 and I am trying to prepopulate a document library
when a site is provisioned by modifying onet.xml. I guess the first
question is, is this possible? As there appears to be no event I can
tap into and then use the object model.... so assuming it is...

The way i have tried to do this (but failed!) is create an instance
of my document library in the configuration tags of the onet.xml.

So in onet.xml

Within the <configuration> block I instantiate my custom made
document library feature

FeatureId="<guid in here>"



Note: it doesnt appear on my quick launch bar either, so any ideas
appreciated :)

Then I add a module section, which i believe will provision the file
into my document library, I maybe wrong??

<Module Name="Default"

<File Url="mydoc.doc"
Type="GhostableInLibrary" />

It doesnt work and when i examine the log files I get the following

88y1 Medium No document templates uploaded for list "Mylist" --
none found for list template "9999".
88yz Medium Creating default modules at URL "http://<server path
details here but removed for posting>"
72ix Medium Not enough information to determine a list for
module "Default". Assuming no list for this module
88z3 High #20015: Cannot open "Shared
Documents/mylist/AllItems.aspx": no such file or folder.

(Can anyone give me an example piece of code to add a document i.e.
a word doc or a power point doc, into a document library at site
provision time, of this all the ones in msdn and in blogs are to do
with master pages or lists, not document libraries)

Any help greatly appreciated, im new to wss, so if anything is
completely wrong I apologise just need some helping out.

I appreciate i shouldnt edit the onet.xml directly but at the moment
im doing a proof of principle.



No Answers Found. Be the First, To Post Answer.