Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Populate List in onet.xml

  Asked By: Ojas    Date: May 25    Category: Sharepoint    Views: 14875

I know how to create and populate a list by adding an entry to the
Configuration->Lists section.

Example (from sts onet.xml):
<List FeatureId="00BFEA71-D1CE-42de-9C63-A44004CE0104" Type="104"
Title="$Resources:core,announceList;"
Url="$Resources:core,lists_Folder;/$Resources:core,announce_Folder;">
<Data>
<Rows>
<Row>
<Field Name="Title">$Resources:onetid11;</Field>
<Field Name="Body">$Resources:onetid12;</Field>
<Field Name="Expires"><ows:TodayISO/></Field>
</Row>
</Rows>
</Data>
</List>

But, I want to be able to parameterize the links. So, for instance,
lets say I want to put an item in the links list that references a
page in my site how would I do this?

The above example does something like this, but with the current
date. It looks like <ows:TodayISO/> will return the current date. I
want to do something like:
<Field
Name="PageLink"><ows:CurrentWEB/>/Pages/MyPage.aspx</Field>

I haven't tried, but I'm guessing the <ows:CurrentWEB/> doesn't
work.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: David Scott     Answered On: May 25

I figured out how to do this.

<Field Type="URL"
Name="URL"><ows:HttpVDir/>/Pages/MyPage.aspx</Field>

I found the HttpVDir element in the 'HTML-Rendering Elements' section
of the CAML reference of the WSS 3.0 SDK
(msdn.microsoft.com/en-us/library/ms480526.aspx).

 
Didn't find what you were looking for? Find more on Populate List in onet.xml Or get search suggestion and latest updates.




Tagged: