UltimateSitemapPath Properties |
UltimateSitemapPath is a custom control for ASP.NET to generate a navigation path (breadcrumb) by matching the current web page to the one inside the sitemap source. It doesn't have a visual designer itself since it is supposed to be a small server control to be used on all web pages rather than only one page as in the case of UltimateSitemap control, which renders a sitemap. Therefore you can either use UltimateSitemapDesigner inside the UltimateSitemap control to generate the sitemap XML file or the UltimateSitemap table in the database, or create them manually.
Note that both controls can share the same sitemap XML file or database unless you want to point them to different sources.
You can drag and drop the control
like any other web control (server control) onto your Web page in VS.NET, and
provide a source for it. You have four options to set the source of your
sitemap.
1. Set SitemapSource to an XML file at design-time or run-time: You can
create an XML file either by using UltimateSitemapDesigner
as your visual designer tool, or by manually authoring the file with the help
of IntelliSense.
2. Set SitemapSourceXml to an XML string at run-time: You can create
your sitemap XML string programmatically by using XMLDocument object model.
Sample code is provided with download.
3. Set DatabaseConnStr and DatabaseSitemapID at design-time or run-time:
You can create a data source (in SQL server, Access or any other database by
providing the connection string) either by using UltimateSitemapDesigner
, or by manually filling the UltimateSitemap table in your database.
4. Set DataSource to a dataset at run-time: You can create a dataset
from your data source easily by using ADO.NET. Sample code is provided with
download.
|
All public properties except SitemapSourceXml and DataSource can
be changed at design-time or run-time. SitemapSourceXml and DataSource can be
changed at run-time only.
| SitemapSourceXml |
XML string to load the UltimateSitemap control from (run-time only).
|
| DataSource |
Dataset to load the UltimateSitemap control from (run-time only).
|
Your sitemap will be automatically located at the position where you place the
UltimateSitemap control on your web page. If you put the control into a table
cell it will be positioned relatively. Therefore you can achieve both relative
and absolute positioning by just dragging and dropping the control
inside or outside a table.
Sitemap XML file has a simple hierarchy of siteMapNode elements. You can
find the XML schema in UltimateSitemapSource.xsd.
You can find the siteMapNode attributes in UltimateSitemapDesigner.
Here is the list of public properties that can be changed at design-time or
run-time:
|
| DatabaseConnStr |
Database connection string to save/load the sitemap to/from database.
|
| DatabaseSitemapID |
ID of the sitemap in the UltimateSitemap table in the database.
|
| SitemapSource |
Source XML file.
|
| CurrentNodeCssClass |
CSS class for the current node.
|
| NodeCssClass |
CSS class for all nodes except current and root nodes.
|
| PathDirection |
Direction of the path between the root and current nodes, which can be set to
RootToCurrent or CurrentToNode. Default is RootToCurrent.
|
| PathSeparator |
Separator between the nodes. Default is " > ".
|
| ParentNodeCssClass |
CSS class for the separator between the nodes.
|
| RenderCurrentNodeAsLink |
Boolean to display current node as navigation link or text. Default is False to
display the current node as text.
|
| RenderNodesAsLinks |
Boolean to display nodes except current node as navigation links or text.
Default is True to display nodes as links.
|
| RootNodeCssClass |
CSS class for the root node.
|
| CurrentNodeID |
ID of the current node to match a node in the sitemap when NodeMatch is set to
CurrentNodeID.
|
| NodeMatch |
Method to find the current node, which can be set to PathAndQuery, AbsolutePath
or CurrentNodeID. Default is PathAndQuery, which tries to match the URL and
query string of the current page to a node in the sitemap.
|
| ParentLevelsDisplayed |
Number of parent nodes displayed over the current node. Default is -1, which
stands for all levels.
|
| PathElements |
Path selection type, which can be set to Parents to select the parents of the
current node, or Siblings to select the nodes in the same level as the current
node. Default is Parents.
|
|