I haven't a clue now after I have restructured it all, why the menu shows but not the breadcrumbs, this is how it is now.
Main Menu:
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li class="dropdown">
<a href="@Url.Action("Index", "About")">About <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>@Html.ActionLink("CLIENTS", "Clients", "About")</li>
<li>@Html.ActionLink("NEWS & MEDIA", "News", "About")</li>
<li>@Html.ActionLink("GROUP WEBSITES", "Group", "About")</li>
</ul>
</li>
<li class="dropdown">
<a href="@Url.Action("Index", "Systems")">Systems <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>@Html.ActionLink("E-CRISTAL", "Ecristal", "Systems")</li>
<li>@Html.ActionLink("CRISTALCHECK", "Cristalcheck", "Systems")</li>
</ul>
</li>
<li class="dropdown">
<a href="@Url.Action("Index", "Risk")">Risk Management <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>@Html.ActionLink("MODULES", "Modules", "Risk")</li>
<li>@Html.ActionLink("AUDITING", "Auditing", "Risk")</li>
<li>@Html.ActionLink("TRAINING", "Training", "Risk")</li>
<li>@Html.ActionLink("HYGIENE TESTING", "Hygiene", "Risk")</li>
</ul>
</li>
<li class="dropdown">
<a href="@Url.Action("Index", "Claims")">Claims Management <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>@Html.ActionLink("CLAIMS & DUE DILIGENCE", "Diligence", "Claims")</li>
</ul>
</li>
<li class="dropdown">
<a href="@Url.Action("Index", "Brand")">Brand Management <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>@Html.ActionLink("BRAND & QUALITY", "Quality", "Brand")</li>
<li>@Html.ActionLink("STANDARDS", "Standards", "Brand")</li>
</ul>
</li>
<li>@Html.ActionLink("Contact", "Index", "Contact")</li>
</ul>
</div>
Then my Mvc.sitemap looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0"
xsi:schemaLocation="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0 MvcSiteMapSchema.xsd">
<mvcSiteMapNode title="Home" controller="Home" action="Index">
<mvcSiteMapNode title="About" controller="About" action="Index">
<mvcSiteMapNode title="Clients" controller="About" action="Clients" />
<mvcSiteMapNode title="News and Media" controller="About" action="News" />
<mvcSiteMapNode title="Group Websites" controller="About" action="Group" />
</mvcSiteMapNode>
<mvcSiteMapNode title="Systems" controller="Systems" action="Index">
<mvcSiteMapNode title="E-Cristal" controller="Systems" action="Ecristal" />
<mvcSiteMapNode title="CristalCheck" controller="Systems" action="Cristalcheck" />
</mvcSiteMapNode>
<mvcSiteMapNode title="Risk Management" controller="Risk" action="Index">
<mvcSiteMapNode title="Modules" controller="Risk" action="Modules" />
<mvcSiteMapNode title="Auditing" controller="Risk" action="Auditing" />
<mvcSiteMapNode title="Training" controller="Risk" action="Training" />
<mvcSiteMapNode title="Hygiene Testing" controller="Risk" action="Hygiene" />
</mvcSiteMapNode>
<mvcSiteMapNode title="Claims Management" controller="Claims" action="Index">
<mvcSiteMapNode title="Claims and Due Diligence" controller="Claims" action="Diligence" />
</mvcSiteMapNode>
<mvcSiteMapNode title="Brand Management" controller="Brand" action="Index">
<mvcSiteMapNode title="Brand and Quality" controller="Brand" action="Quality" />
<mvcSiteMapNode title="Standards" controller="Brand" action="Standards" />
</mvcSiteMapNode>
<mvcSiteMapNode title="Contact" controller="Contact" action="Index" />
</mvcSiteMapNode>
</mvcSiteMap>
Then I have created a whole new set of Controllers for each category, and below is just three
HomeController.cs
using CristalStandards.Models;
using System;
using System.Web.Mvc;
using System.Web.UI;
using LH = CristalStandards.Models.LocalisationHandler;
using System.Collections.Generic;
namespace CristalStandards.Controllers
{
public class HomeController : Controller
{
//
// GET: /Home/
public ActionResult Index()
{
return View();
}
}
}
AboutController.cs
using CristalStandards.Models;
using System;
using System.Web.Mvc;
using System.Web.UI;
using LH = CristalStandards.Models.LocalisationHandler;
using System.Collections.Generic;
namespace CristalStandards.Controllers
{
public class AboutController : Controller
{
//
// GET: /About/
public ActionResult Index()
{
return View();
}
//
// GET: /About/Clients/
public ActionResult Clients()
{
return View();
}
//
// GET: /About/News/
public ActionResult News()
{
return View();
}
//
// GET: /About/Group/
public ActionResult Group()
{
return View();
}
}
}
And SystemsController.cs
using CristalStandards.Models;
using System;
using System.Web.Mvc;
using System.Web.UI;
using LH = CristalStandards.Models.LocalisationHandler;
using System.Collections.Generic;
namespace CristalStandards.Controllers
{
public class SystemsController : Controller
{
//
// GET: /Systems/
public ActionResult Index()
{
return View();
}
//
// GET: /Systems/Ecristal/
public ActionResult Ecristal()
{
return View();
}
//
// GET: /Systems/Cristalcheck/
public ActionResult Cristalcheck()
{
return View();
}
}
}
Then in _Layout.cshtml I have
<div>
@Html.MvcSiteMap().Menu(true)
<p>Start of Breadcrumbs:</p>
@Html.MvThcSiteMap().SiteMapPath()
</div>
And beneath MvcSiteMap() there a red squiggly line with this error:
'HtmlHelper<dynamic>' does