A breadcrumb is display of the trail a site visitor took to arrive at the page. Breadcrumbs are commonly found on Web sites to help navigate the site. For example, a simple text breadcrumb such as Products > Monitors > Flat Panel shows that you arrived at this page by clicking Products, then Monitors, then Flat Panel.
Ektron provides 2 kinds of breadcrumbs.
Type | Description | To set up in Workarea | To place on Web page |
---|---|---|---|
Sitemap | Displays the path through the sitemap to the current page, like the path shown in a Yahoo! directory listing. Sitemap breadcrumbs always show the same path to a page, regardless of how it is reached. | Creating SiteMap Breadcrumbs | FolderBreadcrumb Server Control |
History | More accurately fulfilling the breadcrumb metaphor, they display a history of recently-visited pages. Site visitors can click a history breadcrumb to jump to a previously-visited page. | Not necessary | BreadCrumb Server Control |
You can also use the folder breadcrumb information to deploy a site map. See Also: SiteMap Server Control
Below is an example of a sitemap breadcrumb on a Web page.
The following topics explain how to create and manage Sitemap Breadcrumbs in the Workarea. FolderBreadcrumb Server Control explains how to place them on a Web page.
Before you add a breadcrumb, determine which topics should appear when a Sitemap Breadcrumb control appears on pages that display content in the selected folder. The most common trail would include the sequence of topics that introduce the folder's content, but you can create any sequence that makes sense.
For example, on a university Web site, content that describes the women's swimming team might have this sitemap trail: Home > Athletics > Women's Athletics > Swimming.
The example below adds 3 breadcrumbs to a sitemap trail.
www.example.com
.WARNING! Clicking the Remove button deletes the breadcrumb item. See Also: Removing a BreadcrumbItem
WARNING! Clicking the Remove button deletes the breadcrumb item. See Also: Removing a BreadcrumbItem.
Use a FolderBreadcrumb server control to display Sitemap breadcrumbs. This trail typically consists of the current content’s folder path. For example, the FolderBreadcrumb below matches the content’s folder structure.
The FolderBreadcrumb server control does not read your folder structure and display its path. Instead, administrators define a folder’s breadcrumb trail on the Folder properties > Breadcrumb tab.
The following are Ektron-specific server control properties. You can find information about native .NET properties such as font, height, width and border style in Visual Studio® help.
When set to true, the content title is added to the end of the breadcrumb path, as shown below.
Home > Content > Content_Title
By default, the value is set to false. In that case, the breadcrumb path looks like this.
Home > Content
Indicates if you are logged into the CMS Explorer and can use it to browse to content, collections, and so on. See Also: Browsing Your Ektron Site Using CMS Explorer.
Display the breadcrumb trail for the folder in which the given content ID resides. To use this property, breadcrumb information for a folder must be defined in the Workarea > [Specified Folder] > Folder properties > Breadcrumb tab.
The folder ID for which you want the breadcrumb trail to display. If a DefaultContentID is given, it overrides this property. To use this property, breadcrumb information for a folder must be defined in the Workarea > [Specified Folder] > Folder properties > Breadcrumb tab.
Indicate how to display the breadcrumb trail: horizontally or vertically. The default is Horizontal.
By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, Fill is automatically called during the Page Render event. You might do this if you need to set or change a property on the control in code-behind and have it render with your changes shown.
Gets or sets the QueryString parameter to read a content ID dynamically.
Hides or displays the output of the control in design time and run time.
Set a language for viewing content; shows results in design-time (in Visual Studio) and at run-time (in a browser).
Determines the type of window that appears when you click a link in the server control.
Lets you make the breadcrumb trail appear as non-hyperlinked plain text.
Enter one or more characters to separate the items in a breadcrumb trail on this Web form. The default character is the greater than sign (>).
Suppresses the output of the span/div tags around the control.
Lets a developer specify a server control’s tag.
Add the FolderBreadcrumb server control to each Web form for which you want to create a breadcrumb sitemap. Follow these steps to use the FolderBreadcrumb server control.
DefaultContentID
or DefaultFolderID
property. If you use DefaultContentID
, make sure the content is in a folder where breadcrumb information has been defined. If you use DefaultFolderID
, make sure breadcrumb information has been defined for that folder.A breadcrumb trail can appear vertically or horizontally on a Web page. In addition, you can define how many breadcrumbs are left for site visitors to navigate back. You can also use an image and Alt text instead of, or in addition to, text to display the breadcrumb trail. These variations are illustrated below.
NOTE: If a site visitor revisits a page that is in the breadcrumb trail already, the breadcrumb trail reverts back to that point in the trail. For example, if you visit the following pages Dev > FAQ > WebForm > PR, and then return to FAQ, the breadcrumb trail looks like this: Dev > FAQ.
You should add a BreadCrumb server control to every Web form in your site. Doing this ensures that a breadcrumb trail may appear on each Web page.
Keep in mind that your Web site is made up of Web forms. Each page depends on a form to determine much of its appearance. Forms and pages have a parent > child relationship. That is, a form can be associated with any number of pages.
When defining breadcrumb properties, you define them for a form. All pages that use that form inherit its breadcrumb properties.
Assume, for example, that a Web form is used for the Human Resources section of your Web site. You might use the title Human Resources to identify the form in the BreadCrumb server control. Whenever a page is visited that uses that form, Human Resources appears on the breadcrumb trail -- that is, the form title appears, not the individual page.
BreadCrumb server control properties are divided into 2 categories:
For each Web form, you can customize the breadcrumb trail. For example, you might want the breadcrumb trail to appear horizontally on one Web form and vertically on another. The following property list determines the aspect of breadcrumb trail appearance on a form.
Use these properties define how any page that uses this form appears within a breadcrumb trail. It does not matter where the trail appears.
Note that you can use text, an image, or both to describe the form within the breadcrumb trail. If you use both, the image appears first, followed by the text. the following property list determine the aspect of the Web form when it appears on a breadcrumb trail.
The following are Ektron-specific server control properties. You can find information about native .NET properties such as font, height, width and border style in Visual Studio® help.
Indicates if you are logged into the CMS Explorer and can use it to browse to content, collections, and so on. See Also: Browsing Your Ektron Site Using CMS Explorer.
If desired, enter one or more symbols or characters that identify the current page in the breadcrumb trail. See example below.
These characters appear after the image or title that identifies the current page in the breadcrumb trail.
Gets or Sets the ContentID for the BreadCrumb display title.
Indicate how to display the breadcrumb trail: horizontally or vertically. The default is Horizontal. See Also: Horizontal; text only
Enter text to describe this Web form when it appears in the breadcrumb trail. For example, if the Web form’s properties you are defining is used for all Human Resources pages on your site, enter Human Resources. See Also: BreadCrumb Properties Apply to Web Forms, Not Web Pages
If you define an image in the IconPath
property below, the image appears in the trail, followed by this text.
WARNING! This property is for code-behind only. It cannot be set in design time.
By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, Fill is automatically called during the Page Render event. You might do this if you need to set or change a property on the control in code-behind and have it render with your changes shown.
Gets or sets the QueryString parameter to read a content ID dynamically.
Used to hide the breadcrumb trail in design time and run time.
If you define an image in the IconPath
property, enter any “Alt” text that should appear when a site visitor hovers the cursor over that image. Here is an example.
If you want the breadcrumb trail to display an image to identify this Web form, enter the path to the image.
WARNING! The image location must be relative to the Web root.
For example: \CMS400Developer\Workarea\Images\bc_meta_icon.gif
On the breadcrumb trail, the image precedes any text defined in the DisplayTitle
property.
Set a language for viewing content; shows results in design-time (in Visual Studio) and at run-time (in a browser).
Use this property to determine whether the last breadcrumb item appears as a hyperlink on this Web form. If this property is set to True, and a user clicks the item, the current page reappears.
Determines the type of window that appears when you click a link in the server control.
Enter the maximum number of items in the breadcrumb trail on this Web form. The default is 5. If you set a value of 1 or greater and the user navigates beyond that number of pages, only the most recent pages appear. The older pages disappear from the trail. 0 (zero) = unlimited.
Specify the name of a Metadata Type that you want to associate with the page. For more information, see BreadCrumb Metadata Type
Lets you make the breadcrumb trail appear as non-hyperlinked plain text. The default is Normal.
Enter one or more characters to separate the items in a breadcrumb trail on this Web form. The default character is the greater than sign (>).
Suppresses the output of the span/div tags around the control.
Lets a developer specify a server control’s tag.
To associate a Metadata Type with the BreadCrumb server control:
Add the BreadCrumb server control to each Web form for which you want to create a breadcrumb trail. Follow these steps to use the BreadCrumb server control.
WARNING! Do not add a BreadCrumb server control to a Web form that contains a Calendar server control. When both controls appear on a page and a site visitor clicks on different months, the BreadCrumb trail could look like this: Calendar > Calendar > Calendar > Calendar > Calendar. This happens because each time a site visitor clicks on a month, you are in effect opening a new Web form.
DisplayTitle
property. See DisplayTitle (String)Enter text to describe this Web form when it appears in the breadcrumb trail. For example, if the Web form’s properties you are defining is used for all Human Resources pages on your site, enter Human Resources. See Also: BreadCrumb Properties Apply to Web Forms, Not Web PagesIf you define an image in the IconPath property below, the image appears in the trail, followed by this text.WARNING! This property is for code-behind only. It cannot be set in design time..NOTE: To customize the look of your breadcrumb trail, configure the other properties. For more information, see BreadCrumb Server Control Properties.
By adding a line or 2 of code, the breadcrumb trail can display the title of a content block. You can add a line of code to each Web form or if your content is dynamic, add the code once and each time a new piece of content is called dynamically a new breadcrumb is created.
Only one content block per Web form can be used with the breadcrumb. If you have multiple content blocks on a page, select the one that describes the overall page best.
DisplayTitle
property.BreadCrumb1.DisplayTitle = ContentBlock1.EkItem.Title
The following example content block shows titles used as breadcrumbs.
The word Title appears in the breadcrumb trail when the DisplayTitle
property is left empty. Even with the added code, if the breadcrumb loads before the content block, the breadcrumb has no information in the DisplayTitle
property and therefore displays the word title by default.
If the word Title appears in the breadcrumb trail, check to make sure the word Title does not appear in the DisplayTitle
property. Next, if Title still appears, add the following line of code to the page load event of the code-behind:
ContentBlock1.Fill()
The code in the page load event should now look like this:
ContentBlock1.Fill() BreadCrumb1.DisplayTitle = ContentBlock1.EkItem.Title
This ensures that the content block information is loaded first.
The Sitemap server control utilizes the folder breadcrumb information in the Workarea to display a sitemap of your site. By choosing the starting point of the sitemap, the max levels to display and applying a style class, you can customize the sitemap. The sitemap appears as indented list when viewed on a Web page.
The contents of the sitemap are defined on the Breadcrumb tab, located in the Workarea folder properties. See Also: Breadcrumbs
The following are Ektron-specific server control properties. You can find information about native .NET properties such as font, height, width and border style in Visual Studio® help.
Indicates if you are logged into the CMS Explorer and can use it to browse to content, collections, and so on. See Also: Browsing Your Ektron Site Using CMS Explorer.
The number of seconds that the server control’s data is cached. The default is 0 (zero). For example, if you want to cache the data for 5 minutes, set to 300. See Also: Caching with Server Controls.
The style sheet class name used to format the HTML. Leave blank to use the default. To use a new class, add it to the following file:
webroot\siteroot\Workarea\csslib\sitemap.css
Then, add the class name to the property.
If desired, enter a relative or absolute path to an Xslt that determines the display of the page.
WARNING! If you specify an external file, do not store this file in the Workarea folder. If you store this file in the Workarea folder, the file will be lost when you upgrade.
By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, Fill is automatically called during the Page Render event. You might do this if you need to set or change a property on the control in code-behind and have it render with your changes shown.
When set to True, include site nodes from the parent folder but not their items. Set to False to include all nodes and items.
The folder ID for the starting point of the site map. To choose the root folder, enter 0 (zero).
Hides or displays the output of the control in design time and run time.
Set a language for viewing content; shows results in design-time (in Visual Studio) and at run-time (in a browser).
Set the maximum amount of levels to show. 0 (zero) = unlimited.
Set to the starting level of the site map. If set to 0 (zero), starts from the root.
Suppresses the output of the span/div tags around the control.
Lets a developer specify a server control’s tag.
NOTE: Make sure you have added the sitemap information to your folders’ Breadcrumb tab in the Ektron Workarea.
To use the Sitemap server control:
FolderID
property. Retrieving the XML structure of XML content allows for greater control over developing XSLs. The following is an example of how to retrieve the XML structure:
FolderID
property.TextMode
property to MultiLine.NOTE: It is also recommended that you set the width of the text box to at least 400px.
Textbox1.Text = SiteMap1.XmlDoc.InnerXml
For an additional example, see the XML Site Map page in the CMS400Developer samples page. It is located at:
In a browser:
http://siteroot/CMS400Developer/Developer/Sitemap/SiteMapXML.aspx
In the source code:
siteroott/CMS400Developer/Developer/Sitemap/SiteMapXML.aspx and SiteMapXML.aspx.vb