Posts

Showing posts with the label Sharepoint Menus

Customizing Navigation Controls and Providers

To customize navigation, you should rely on the ASP.NET Site Navigation mechanism, because it provides a standard, consistent, and easily managed solution. Customizing Web Display Controls (Menu, TreeView, and SiteMapPath) : You can customize the look and feel of standard display controls by using cascading style sheets (CSSs). You can also write your own ASP.NET 2.0 controls and use them in Office SharePoint Server 2007 navigation. To learn more, see the Menu class documentation. Note : Office SharePoint Server 2007 also provides default navigation components that you can customize, such as the Content By Query Web Part and the Table of Contents Web Part. You can configure these two controls to present a custom selection of links. To implement your own site map provider, you can derive a custom provider class from any of the default site map providers. Office SharePoint Server 2007 includes several default providers. You can also derive a custom provider class from the SiteMapProvid...

PortalSiteMapProvider

The PortalSiteMapProvider object is the true source of hierarchical navigation data and it provides the data to the PortalSiteMapDataSource object. The PortalSiteMapProvider retrieves nodes from the Windows SharePoint Services 3.0 SPNavigation store. You use the SPNavigation object to create static links and groupings. After you provide static links and groupings, the application merges in dynamic items that represent Web sites and pages with the static links and groupings. Office SharePoint Server 2007 also applies security trimming so that users see only the navigation items to which they have permission to navigate. Declare named providers in the application's web.config file to make them widely accessible. Declarations of the two most important PortalSiteMapProvider objects— CombinedNavSiteMapProvider and CurrentSiteNavSiteMapProvider—are shown in the following code. add name="CombinedNavSiteMapProvider" description= "MOSS 2007 provider for Combined naviga...

PortalSiteMapDataSource

The PortalSiteMapDataSource is a data source specific to Office SharePoint Server 2007 that retrieves data from the PortalSiteMapProvider object and exposes data according to the ASP.NET 2.0 hierarchical data source interface. The PortalSiteMapDataSource object specifies the name of the PortalSiteMapProvider object it uses to retrieve data through the ASP.NET 2.0 SiteMapProvider property. When the master page markup includes the DataSourceID="GlobalNavDataSource" attribute, the application returns a PortalSiteMapDataSource object. PublishingNavigation:PortalSiteMapDataSource ID="GlobalNavDataSource" Runat="server" SiteMapProvider="CombinedNavSiteMapProvider" ShowStartingNode="false" StartFromCurrentNode="true" StartingNodeOffset="0" TrimNonCurrentTypes="Heading" TreatStartingNodeAsCurrent="true" /> The properties are, ShowStartingNode - Affects whether the starting node is returned by ...

Horizontal and Vertical Menus

When you first create a site structure that includes a root or top-level site, more than one Web site, and pages and additional sites that are children of the top-level site, Office SharePoint Server 2007 creates two menus: a horizontal (top) menu, and a vertical (left) menu. Horizontal and vertical menus are declared in master page markup. The following example declares a horizontal menu. SharePoint:AspMenu ID="GlobalNav" Runat="server" DataSourceID="GlobalNavDataSource" Orientation="Horizontal" StaticDisplayLevels="1" MaximumDynamicDisplayLevels="1" /> The vertical menu is declared similarly, but uses different properties from the horizontal menu. These properties are identical to those available on the ASP.NET 2.0 Menu control. The following are the properties included by default in master page markup for both horizontal and vertical menus: DataSourceID - Specifies the data source control that provides the hierarchical...