Defines the New menu in the toolbar for a list view, which is the section of a view that is rendered above the view header.
<Toolbar Position = "After" Type = "Standard" | "FreeForm"> </Toolbar>
Position
Optional Text. If Position = "After" is specified, the toolbar will appear below the view body. If not specified, the toolbar will appear above the view body.
Type
Required Text. Specifies the kind of toolbar and can be set to either Standard or FreeForm.
Numerous
View
Minimum: 0
Maximum: 1
The following excerpt from the Schema.xml file for custom lists defines the New command of the toolbar, displaying the option to create items only to users with permission to add list items.
<Toolbar Position="After" Type="Freeform"> <IfHasRights> <RightsChoices> <RightsGroup PermAddListItems="required" /> </RightsChoices> <Then> <HTML><![CDATA[ <table width=100% cellpadding=0 cellspacing=0 border=0 > <tr> <td colspan="2" class="ms-partline"><IMG SRC="/_layouts/images/blank.gif" width=1 height=1 alt=""></td> </tr> <tr> <td class="ms-addnew" style="padding-bottom: 3px"> <img src="/_layouts/images/rect.gif" alt=""> <a class="ms-addnew" ID="idAddNewItem" href="]]></HTML> <URL Cmd="New" /><HTML><![CDATA[" ONCLICK="javascript:NewItem(']]></HTML> <URL Cmd="New" /><HTML><![CDATA[', true);javascript:return false;" target="_self">]]></HTML><HTML><!-- _locID_text="onetid6" _locComment="{StringCategory=HTX}" -->$Resources:core,addnewitem;</HTML><HTML><![CDATA[</a> </td> </tr> <tr><td><IMG SRC="/_layouts/images/blank.gif" width=1 height=5 alt=""></td></tr> </table>]]></HTML> </Then> </IfHasRights> </Toolbar>
If you define a hidden view, with a toolbar element like this: <Toolbar Type="None">, you can use the View Id in onet.xml module section to remove any toolbar on the webpart (same as if you disable the toolbar from webpart properties in page edit mode):
example:
<Views> ..... <View BaseViewID="12" Hidden="TRUE" DefaultView="FALSE" ....> <Toolbar Type="None"> </Toolbar> </View> ..... </Views>
<Views>
..... <View BaseViewID="12" Hidden="TRUE" DefaultView="FALSE" ....> <Toolbar Type="None"> </Toolbar> </View> .....
.....
<View BaseViewID="12" Hidden="TRUE" DefaultView="FALSE" ....>
<Toolbar Type="None"> </Toolbar>
</View>
</Views>
<Modules> <Module Name="DefaultConfig" Url="" Path=""> <File Url="default.aspx" NavBarHome="False"> <View List="101" BaseViewID="12" WebPartZoneID="Left" WebPartOrder="2"><![CDATA[<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2"><Assembly>Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly><TypeName>Microsoft.SharePoint.WebPartPages.ListViewWebPart</TypeName><Title>Some title here</Title><FrameType>Default</FrameType><Description>Some description here</Description></WebPart> ]]></ViewFields></View> </File> </Module> </Modules>
<Modules>
<Module Name="DefaultConfig" Url="" Path=""> <File Url="default.aspx" NavBarHome="False"> <View List="101" BaseViewID="12" WebPartZoneID="Left" WebPartOrder="2"><![CDATA[<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2"><Assembly>Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly><TypeName>Microsoft.SharePoint.WebPartPages.ListViewWebPart</TypeName><Title>Some title here</Title><FrameType>Default</FrameType><Description>Some description here</Description></WebPart> ]]></ViewFields></View> </File> </Module>
<Module Name="DefaultConfig" Url="" Path="">
<File Url="default.aspx" NavBarHome="False"> <View List="101" BaseViewID="12" WebPartZoneID="Left" WebPartOrder="2"><![CDATA[<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2"><Assembly>Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly><TypeName>Microsoft.SharePoint.WebPartPages.ListViewWebPart</TypeName><Title>Some title here</Title><FrameType>Default</FrameType><Description>Some description here</Description></WebPart> ]]></ViewFields></View> </File>
<File Url="default.aspx" NavBarHome="False">
<View List="101" BaseViewID="12" WebPartZoneID="Left" WebPartOrder="2"><![CDATA[<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2"><Assembly>Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly><TypeName>Microsoft.SharePoint.WebPartPages.ListViewWebPart</TypeName><Title>Some title here</Title><FrameType>Default</FrameType><Description>Some description here</Description></WebPart> ]]></ViewFields></View>
</File>
</Module>
</Modules>
So... Type attribute has also "None" option.