Share via


Toolbar Element

The Toolbar element defines the toolbar for a view, in other words, the section of a view that is rendered once before the view header.

Syntax

<Toolbar
  Type = "Standard" | "FreeForm">
</Toolbar>

Attributes

Name Description
Type  Required. Specifies the kind of toolbar and can be set to either Standard or FreeForm.
Parent Elements Child Elements
View FilterLink, GetVar, HTML, HttpPath, HttpVDir, List, ListProperty, ScriptQuote, Switch, URL

Example

The following excerpt from SCHEMA.XML in the CustList folder of the wwwroot directory defines a freeform toolbar for a custom list.

<Toolbar Type="Freeform">
  <HTML>
    <![CDATA[ <table cellpadding="0" cellspacing="1" border="0" width="100%"><tr><td nowrap><a class="ms-homepagetitle" href="  ]]>
  </HTML>
  <ListProperty Select="DefaultViewUrl" />
  <HTML><![CDATA[ " ID=onetidCustlist>  ]]></HTML>
  <ListProperty Select="Title" HTMLEncode="TRUE" />
  <HTML><![CDATA[ </a>&nbsp;</td><td nowrap align="  ]]></HTML>
  <HTML>right</HTML>
  <HTML>
    <![CDATA[ "><a class="ms-addnew" ID="addnewcustlist" href="  ]]>
  </HTML>
  <URL Cmd="New" />
  <HTML><![CDATA[ " ONCLICK="javascript:NewItem('  ]]></HTML>
  <URL Cmd="New" />
  <HTML>
    <![CDATA[ ', true);javascript:return false;" target="_self">  ]]>
  </HTML>
  <HTML>Add new item</HTML>
  <HTML>
    <![CDATA[ </a></td></tr><tr><td colspan="2" class="ms-sectionline"><IMG src="  ]]>
  </HTML>
  <HttpVDir />
  <HTML>
    <![CDATA[ /_layouts/images/blank.gif" width="1" height="1"></td></tr></table> ]]>
  </HTML>
</Toolbar>