Central Administration Pages

Applies to: SharePoint Foundation 2010

The SharePoint Foundation Central Administration Web site uses a virtual directory named /_admin that is similar to the /_layouts virtual directory of content sites. The administrative virtual directory is mapped physically to the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\\Template\Admin directory, which is where you can place custom administration pages. Pages that are located in this directory are associated with the configuration database and not with the content database.

Administration Master Page

To ensure consistency across all administration pages, SharePoint Foundation provides a master page (admin.master) that defines page layout. For information about master pages in SharePoint Foundation, see Master Pages.

The following list describes key placeholders that are defined in the SharePoint Foundation master page file:

  • PlaceHolderPageTitle   The title that is displayed in the top browser bar.

  • PlaceHolderPageTitleInTitleArea   The title that is displayed in large black text on the rendered page.

  • PlaceHolderAdditionalPageHead   Additional items to be placed within the <HEAD> tag of the page, which provides an ideal location for client-side script on the page.

  • PlaceHolderPageDescription   The page description.

  • PlaceHolderMain   The location where most of the derived page content is placed.

Both the site settings and administration pages utilize a set of user controls and server controls to ensure consistency across different page types. For example, settings pages use InputFormSection, and InputFormControl user controls, while List or grid style pages might use ToolBar and ToolBarButton server controls to implement a toolbar.

Administration Pages and Localization Resources

Administration ASPX pages are global and rely on the localization infrastructure that is built into ASP.NET.

The following example shows how to specify the resource ID for the title of a drop-down control:

<asp:DropDownList id="MyExample" runat="server" 
Title="<%$Resources:YourResxFile, example_title%>" />

Resources for the Web pages are contained in a .resx file that you can place in the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\Config\AdminResources directory. When you provision a Web application, the resources defined in this file are copied to the appropriate Internet Information Services directory. If you make a change to the .resx file after the Central Administration site has been provisioned, you can run the stsadm.exe –o copyappbincontent command-line operation to redeploy the revised resource files.

Code Behind

To separate code and content, ASP.NET Web pages are typically divided into code-behind classes and .aspx pages. Code-behind classes are compiled into a private assembly for the administration Web application. If you place the assembly in the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\\Config\AdminBin directory, it is copied to the administrative IIS Web site during provisioning. If you recompile the project after the central administration Web site has been created, you can redeploy the assembly by running the stsadm.exe –o copyappbincontent command-line operation.

The breadcrumb at the top of an administration page is built by using an XML file that contains the page hierarchy. You must place sitemap files in the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\Template\Admin directory with your custom .aspx pages and name the sitemap files to match the pattern admin.sitemap.*.xml. The following example sitemap file shows how to create the breadcrumb for a new settings page that is linked from the Operations page:

<siteMap>
  <siteMapNode url="/_admin/YourPage.aspx" 
               parentUrl="/_admin/applications.aspx" 
               title="$Resources:YourResource,YourPage_StringId" />
  <siteMapNode url="/_admin/YourSubPage.aspx" 
               title="$Resources: YourResource,YourSubPage_StringId" />
</siteMap>

Like .aspx pages, a breadcrumb files also utilizes the ASP.NET framework for localization.

The Operations and Application Management pages use the SharePoint Foundation Features infrastructure to provide link extensibility. For information about how to use Features to add links, see How to: Modify the User Interface Using Custom Actions.

To find the Location and GroupId properties that are appropriate for a new link, browse the existing link definitions. The default links for the Operations and Application Management pages are contained in the Operations.xml and Applications.xml files of %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\\TEMPLATE\FEATURES\AdminLinks.

Feature files implement the SharePoint Foundation framework to localize XML files. Specifying resources is similar to the ASP.NET syntax, except for a trailing semi-colon (;). Place .resx files that define these strings in \12\Template\Resources.

See Also

Concepts

SharePoint Page Types