The config.xml file should include the following elements and attributes:

 

<CP>

  <WebParts Location="bottom" AllowMove="true">

    <WebPart Id="web_part_name" Class="web_part_class_name" Assembly="web_part_assembly_file_name" AuthorizationFilter="useradmin">

      <DataItem name="Title" data="web_part_title_name"/>

      <DataItem name="AllowMinimize" data="true" />

      <DataItem name="Visible" data="true" />

    </WebPart>

    <WebPart>...</WebPart>

    .

    .

    .

  </WebParts>

</CP>

 

The table below explains the elements and their attributes mentioned above:

Name 

Description

Required
/Optional 

Default value if the parameter is optional and not specified

CP

Root node for the Web Part configuration.

Required

 

WebParts

Parent tag that contains information for all the Web Parts.

Required

 

Location

Position at which the Web Parts are displayed.

 

It can have one of the following values:

  • bottom: The Web Parts are displayed at the bottom of the home page.

  • top: The Web Part are displayed at the top of home page.

Optional

bottom

AllowMove

Defines whether users can move the Web Parts within the Web Part zone.

 

It can have one of the following values:

  • true: Users can move the Web Parts within the zone.

  • false: Users can not move the Web Parts.

Optional

true

WebPart

Contains settings for a single Web Part.

Required

 

Id

Identifier for the Web Part.

Required

 

Class

Name of the type or class that is used from the Web Part's assembly.

 

Required

 

Assembly

Name of the Web Part's assembly file that contains the code for the Web Part.

Required

 

AuthorizationFilter

Defines in which control panels the Web Part is displayed.

 

It can have one of the following values:

  • siteadmin: The Web Part is displayed only in the organization control panels.

  • useradmin: The Web Part is displayed in both the organization and user control panels.  

Required

 

DataItem

Defines the properties for the Web Part. It includes the Title, AllowMinimize, and Visible properties.

Optional

Uses the default values of the Title, AllowMinimize, and Visible properties

Title

Title of the Web Part that is displayed at the top of the Web Part.

Optional

No title is displayed

AllowMinimize

Defines whether the Web Part can be minimized by users.

 

It can have one of the following values:

  • true: Users can minimize and maximize the Web Part.

  • false: Users can neither minimize nor maximize the Web Part.

  • If a user has minimized the Web Part in the control panel, and you change the value of AllowMinimize from true to false, then the user will still be able to maximize the Web Part using the maximize link. But, as soon as the user maximizes the Web Part, the minimize link will disappear and the user will be unable to minimize the Web Part again.

Optional

true

Visible

Defines whether the Web Part is visible or hidden from the users.

 

It can have one of the following values:

  • true: The Web Part is visible to users.

  • false: The Web Part is hidden from users.

Optional

true