Breadcrumb trail Portlet

From Sense/Net Wiki
Jump to: navigation, search
  •  
  •  
  •  
  •  
  • 90%
  • 6.0
  • Enterprise
  • Community
  • Planned

Overview

Breadcrumb.png
Breadcrumb trail Portlet is responsible for the automatic creation of a breadcrumb trail using the current position of the user navigation-wise. It helps the user to know where they are inside the hierarchy of the portal and it also enables them to easily step back to any previous position at will.

Details

The Breadcrumb trail Portlet is a Context bound portlet meaning that it is able to generate a breadcrumb trail using different Content as the primary context without having to build multiple pages for the various Content. Apposite the Site menu Portlet, it shows the horizontal structure of the portal which can be very useful to users in some scenarios. However, it does not substitute the standard site menu.

You can customize your breadrumbs in a very wide range. A most important feature is that you can set wheter the trail displays the link of the site or not. If you set it to true, you can define what text you would like to see as the sitename. If you leave this property empty, the default text will be the DisplayName of the Site.

Properties

Own properties

Property Property name for embedding Possible values Description
CSS class name for items ItemCssClass text This is the css class name for the items in list mode
CSS class name for links LinkCssClass text This is the css class name for the links
CSS class name for separator SeparatorCssClass text This is the css class name for the separator string
Breadcrumb separator Separator text This is the separator string between elements in linear mode
Active item CSS class name ActiveItemCssClass text This is the css class name for the active item
Show first element ShowSite true/false Show the root element's name in the beginning of the breadcrumb or not
First element displayed name SiteDisplayName text This will be displayed as the name of the first element

Inherited properties

Context binding

Property Property name for embedding Possible values Description
Bind Target BindTarget Unselected
CurrentContent
CurrentSite
CurrentPage
CurrentUser
CurrentStartPage
CustomRoot
CurrentWorkspace
Select the bound content as the start of the navigation items. Set it to CustomRoot to select a content with absolute path regardless of the context
Custom root path CustomRootPath Root relative Repository path Define bound content with absolute path when Bind Target is set to CustomRoot
Ancestor selector index AncestorIndex positive whole number Set the bound content to the ancestor of Bind Target specified by index. 0 leaves the bound content as specified above, 1 selects parent, higher value selects higher order ancestor
Relative content selector path RelativeContentPath relative Repository path Sets the bound content relative to the above settings with a relative path. Ie.: 'CustomChildFolder/CustomNode' selects 'CustomNode' from Bind Target's 'CustomChildFolder' child folder. Relative to ancestor when Ancestor selector index is set

User interface

Property Property name for embedding Possible values Description
Portlet title Title text Sets the visible title of the current portlet. Title header visibility is controlled with Appearance property
Appearance ChromeType Default
None
TitleAndBorder
TitleOnly
BorderOnly
Controls title and border visibility. By default both are visible
Renderer Renderer Repository path Select an XSLT renderer for rendering portlet output
Portlet skin css prefix SkinPreFix text When set portlet container div gets an extra css class. Ie. 'skinexample' adds css class 'skinexampleSkin' to container div
Current element rendered as link CurrentElementAsLink true/false When checked, current element (last in the list) is rendered as link

Cache

Property Property name for embedding Possible values Description
Portlet is cached Cacheable true/false If set the output of the portlet will be cached
Portlet is cached for logged in user CacheableForLoggedInUser true/false If set the output of the portlet will be cached even if the user is logged in.
Request path influences caching CacheByPath true/false Defines whether the requested content path is included in the cache key. When unchecked portlet output is preserved regardless of the page's current context content or request path. Check it if you want to cache portlet output depending on the requested context content.
Url query params influence caching CacheByParams true/false Defines whether the url query params are also included in the cache key. When unchecked portlet output is preserved regardless of changing url params
Language influences caching CacheByLanguage true/false Defines whether the language code is also included in the cache key. When unchecked portlet output is preserved regardless of the language that the users use to browse the site. If set, a different output will be cached for any language the users visit the site on.
Sliding expiration SlidingExpirationMinutes positive whole number Given in minutes. The portlet is refreshed when it has not been accessed for the given minutes
Absolute expiration AbsoluteExpiration positive whole number Given in seconds. The portlet will be refreshed periodically with the given time period
Debug Debug true/false Check this property to show debug info about portlet cache state at the bottom of the portlet's layout

for Portal builders

PageTemplate embedding code

If you want to embed your Breadcrumb trail portlet into your PageTemplates somewhere, look at the following markup. The attributes/options and the range of their accepted values are the same as above.(Don't forget to include a unique ID and runat="server" attributes!)

<snpe:BreadCrumbPortlet
   ID="BreadCrumbPortlet1"
   runat="server"
   ShowSite="true"
   SiteDisplayName="Home"
   Title="Breadcrumbs"
   Separator="&gt;"
/>

Content type filtering

There is a way to hide some unwanted elements from the navigation items by content type. The BreadCrumbBlackList in the global or local Portal.settings content can contain a content name list as a filter. See there the example.

Skining

There are several properties which allow you to customise the Breadcrumb trail Portlet according to your needs. You can set the CSS class names which defines the look of your breadcrumbs.

Example/Tutorials

Related links

References