Hibri Marzook Musings on technology and systems thinking

CSS Adapter for the SiteMapPath control.

Wrote a CSS Adapter for the SiteMapPath control. I wanted a breadcrumb trail with clean link tags only. Renders a clean set of link tags within a div tag (and optionally a span tag).

Usage:

Add the SiteMapPathAdapter.cs file to your web project. (rename the .txt file to .cs)

Add a .browser file to the web site. Add the following entry in the controlAdapters element.

<adapter controlType ="System.Web.UI.WebControls.SiteMapPath"
               adapterType ="SiteMapPathAdapter" />

 

Drag and drop the control on to the web form

«/span>asp:SiteMapPath ID=”SiteMapPath1runat=”serverCssSelectorId=”breadcrumbs>
        «/span>/asp:SiteMapPath>

Use the CssSelectorId attribute to give the surrounding div an identifier.

More on CSS Adapters

CSS Control Adapter Toolkit for ASP.NET 2.0

Architectural Overview of Adaptive Control Behavior

Browser Definition file schema

By Hibri Marzook

Discuss this post with me on @hibri