views:

360

answers:

2

I am using VSeWSS 1.3 to create a custom list definition scoped to 'Site'.

    <Elements Id="8924acef-84ef-4584-ade4-e3eaeb8df345" xmlns="http://schemas.microsoft.com/sharepoint/"&gt;

  <ListTemplate Name="MyListDefinition"
                DisplayName="MyList"
                Description=""
                BaseType="0"
                Type="10888"
                OnQuickLaunch="TRUE"
                SecurityBits="11"
                Sequence="410"
                Image="/_layouts/images/itgen.gif" />

  <CustomAction
    Id="MyList.Print"
    Location="Microsoft.SharePoint.StandardMenu"
    GroupId="ActionsMenu"
    Title="Print MyItem"
    Description="Print Empty copies of this form."
    RegistrationType="List"
    ControlAssembly="MyList, Version=1.0.0.0, Culture=neutral, PublicKeyToken=de6e0316a726abcd, processorArchitecture=MSIL"
    ControlClass="MyList.PrintActionMenu" />

  <Module Name="ActionPages" Url="">
    <File Url="PrintForm.aspx" Type="Ghostable" Path="MyListDefinition\PrintForm.aspx" />
  </Module>
</Elements>

The file 'PrintForm.aspx' is correctly installed on the server under ...\12\TEMPLATE\Features... , but it doesn't show up under the expected URL http://localhost/site/lists/listname/PrintForm.aspx after installing the list template and creating a new list instance using this template.

I suspect I am missing the correct properties in the and/or tags in my ListDefinition.xml file (shown above).

A: 

You should also have a schema.xml and in the schema.xml there should be something like this:

<Forms>
  <Form Type="DisplayForm" Url="DispForm.aspx" WebPartZoneID="Main" />
  <Form Type="EditForm" Url="EditForm.aspx" WebPartZoneID="Main" />
  <Form Type="NewForm" Url="NewForm.aspx" WebPartZoneID="Main" />
  ...... your form here
</Forms>

P.S. try the SharePoint Solution Generator to export an existing List (Comes with VSeWSS), it'll give you a complete xml definition. You can use that as a reference.

P.P.S. in the link posted in the comment it states that files should be registered in the feature like so:

<ElementFile Location="GenericList\schema.xml" />
<ElementFile Location="GenericList\DispForm.aspx" />
<ElementFile Location="GenericList\EditForm.aspx" /> 
<ElementFile Location="GenericList\NewForm.aspx" /> 
<ElementFile Location="GenericList\AllItems.aspx" />
Colin
What's the value for the Type attribute?
Philipp Schmid
Not sure. add your form to a list and then use SSG to reverse engineer the xml needed. also, SPSource can do the same...
Colin
also, check this out: http://www.sharepointdevwiki.com/display/public/Creating+a+List+Template+within+a+Feature
Colin
A: 

If it is anywhere, I would expect PrintForm.aspx to show up in the root folder of your website when the Url of your Module element is blank. Try this:

  <Module Name="ActionPages" Url="lists/listname">    
        <File Url="PrintForm.aspx" Type="GhostableInLibrary" Path="MyListDefinition\PrintForm.aspx" />  
  </Module>

Also, try GhostableInLibrary instead of Ghostable as the File Type.

Finally, you mention that PrintForm.aspx does show up somewhere in Features, but did not give the complete path. Make sure it is in ...\12\TEMPLATE\Features\YourFeaturesName\MyListDefinition\PrintForm.aspx. Based on the value of the Path attribute, PrintForm.aspx needs to be in a directory named MyListDefinition within your Feature.

Rich Bennema