We're binding to a sitemap file as shown below:
The base controller executes this code in the constructor:
It's binding correctly using some of the examples shown on these forums. However, the nodes in Bold above don't expand. So clicking on System does nothing. Using Firebug I can see the sub-items are there rendered as a UL so I go into Firebug and remove the display:none attribute.
The first screenshot "How it should look.png" shows what it should look like expanded.
Note: I had to use Firebug to get it to display. Clicking on System does nothing... doesn't even throw any errors.
Note 2: When this panelbar is used on a page that is not included in the Sitemap or rendered out as part of the HTML hierarchy then the items expand, but on pages that do exist in the Sitemap, it doesn't work at all.
Any ideas or do you need more information?
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
siteMap
>
<
siteMapNode
title
=
"Home"
controller
=
"Home"
action
=
"index"
>
<
siteMapNode
title
=
"Dashboard"
controller
=
"MyController"
action
=
"index"
/>
<
siteMapNode
title
=
"My Future"
controller
=
"MyController"
action
=
"Input"
/>
<
siteMapNode
title
=
"My Retirement"
controller
=
"MyController"
action
=
"Input"
/>
<
siteMapNode
title
=
"System"
>
<
siteMapNode
title
=
"Profile"
controller
=
"MyController"
action
=
"Profile"
/>
<
siteMapNode
title
=
"Income and Expenses"
controller
=
"MyController"
action
=
"IncomeAndExpenses"
/>
<
siteMapNode
title
=
"Assets and Liabilities"
controller
=
"MyController"
action
=
"AssetsAndLiabilities"
/>
<
siteMapNode
title
=
"Insurance"
controller
=
"MyController"
action
=
"Insurance"
/>
<
siteMapNode
title
=
"Bootstrap"
>
<
siteMapNode
title
=
"Typography"
controller
=
"system"
action
=
"Typography"
/>
</
siteMapNode
>
</
siteMapNode
>
</
siteMapNode
>
</
siteMap
>
The base controller executes this code in the constructor:
if
(!SiteMapManager.SiteMaps.ContainsKey(
"main"
))
{
SiteMapManager.SiteMaps.Register<XmlSiteMap>(
"main"
, sitemenu => sitemenu.LoadFrom(
"~/Utilities/Sitemaps/Main.sitemap"
));
}
It's binding correctly using some of the examples shown on these forums. However, the nodes in Bold above don't expand. So clicking on System does nothing. Using Firebug I can see the sub-items are there rendered as a UL so I go into Firebug and remove the display:none attribute.
The first screenshot "How it should look.png" shows what it should look like expanded.
Note: I had to use Firebug to get it to display. Clicking on System does nothing... doesn't even throw any errors.
Note 2: When this panelbar is used on a page that is not included in the Sitemap or rendered out as part of the HTML hierarchy then the items expand, but on pages that do exist in the Sitemap, it doesn't work at all.
Any ideas or do you need more information?