In my master page I have the line
<div class ="breadcrumbs" runat="server"><%= SitePath()%></div>
SitePath() involks a custom class that builds navigation elements based on the combination of the static sitemap and dynamically generated pages. It returns the html for a custom breadcrumb navigation element.
Here is the SitePath() code from my code behind
public string SitePath()
{
BreadCrumbNav breadNav = new BreadCrumbNav();
breadNav.divClass = ".dv";
breadNav.homeTitle = "ABC Home";
return breadNav.Build();
}
I'd like to be able to override this from my dynamic pages so I can add to the path. For Example...
public override string SitePath()
{
BreadCrumbNav breadNav = new BreadCrumbNav();
breadNav.divClass = ".dv";
breadNav.homeTitle = "ABC Home";
breadNav.AddPage("Cooking Equipment", "PathyGoodness/Cooking+Equipment.ASPX");
breadNav.AddPage("Toasters", "PathyGoodness/Cooking+Equipment/Toasters.ASPX");
return breadNav.Build();
}
Is there a way to bring the master page methods into scope so I can override them- or do I need to go about this in a different way? It feels like I'm missing something really obvious, but I seem to be stuck.
Thanks for your help!