DominionZA
Top achievements
Rank 1
DominionZA
asked on 17 Oct 2013, 04:20 PM
Hi am trying to bind my sitemap to the KendoUI Tabstrip. I am having no joy with the MVC Sitemap though.
If I rename the nodes in my .sitemap from mvcSiteMapNode to siteMapNode then all works. When I change it back to mvcSiteMapNode it won't work. Nothing renders on the page.
What is the correct way to do this?
If I rename the nodes in my .sitemap from mvcSiteMapNode to siteMapNode then all works. When I change it back to mvcSiteMapNode it won't work. Nothing renders on the page.
What is the correct way to do this?
7 Answers, 1 is accepted
0
Hello,
Daniel
Telerik
The nodes should be named "siteMapNode" and using a different name is not support. The only option to change the name and use the built-in sitemap binding is to modify the source code(XmlSiteMap class, SiteMapNodeName property).
Regards,Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
DominionZA
Top achievements
Rank 1
answered on 21 Oct 2013, 01:49 PM
This does not work for me. I am using MVCSiteMapProvider so I have nice tight integration between my SiteMap and MVC framework.
So you saying I can't use it because Kendo won't integrate too?
How then can I manually construct my menu based on the sitemap file and mvcSiteMap nodes? I don't mind if I have to do this. I just don't want to have to give up using MVCSiteMapProvider because your menu's and tabs don't support it.
So you saying I can't use it because Kendo won't integrate too?
How then can I manually construct my menu based on the sitemap file and mvcSiteMap nodes? I don't mind if I have to do this. I just don't want to have to give up using MVCSiteMapProvider because your menu's and tabs don't support it.
0
Accepted
Hello again,
Daniel
Telerik
In that case, you will need to create a collection of objects from the sitemap file and bind them to the menu as described in this documentation topic. I attached a sample project that demonstrates this scenario.
Regards,Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
DominionZA
Top achievements
Rank 1
answered on 23 Oct 2013, 03:24 PM
Thanks Daniel. Will try your suggestion out and see how it goes.
0
DominionZA
Top achievements
Rank 1
answered on 23 Oct 2013, 05:15 PM
Thank-you Daniel. I am up and running with your suggestion.
0
DominionZA
Top achievements
Rank 1
answered on 23 Oct 2013, 05:40 PM
While on this topic Daniel, please help me to bind the same model from above to your TabStrip.
We will only ever go one level deep, so a TabStrip may look nicer for this.
I can get the tabs to bind and show text etc.. but cannot get the content for each tab based on the sitemap children.
We will only ever go one level deep, so a TabStrip may look nicer for this.
I can get the tabs to bind and show text etc.. but cannot get the content for each tab based on the sitemap children.
0
Hello,
Regards,
Daniel
Telerik
You can set the content of the node to the TabStripItem Html property:
Html.Kendo().TabStrip()
.Name(
"tabstrip"
)
.BindTo(Model, (item, node) =>
{
item.Text = node.Title;
if
(!
string
.IsNullOrEmpty(node.Html))
{
item.Html = node.Html;
}
else
{
item.ActionName = node.Action;
item.ControllerName = node.Controller;
}
})
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!