Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question Load Xml SiteMap from external Resource #477

Open
orney21d opened this issue Mar 28, 2018 · 2 comments

Comments

@orney21d
Copy link

commented Mar 28, 2018

Hi,
We are using MvcSiteMapProvider in MVC5 project. We have static sitemap in the directory with the following structure:

WebSite
--SiteMapFolder
-----WebMvc.sitemap
-----WebMvcSiteMapSchema.xsd

And we have too defined a Template to load Breadcrumbs, i use this just for Breadcrumbs. Then in a layout i call the Helper:
@Html.MvcSiteMap().SiteMapPath("MyCustomTemplateInSharedViewsFolder")
Until now all ok, but, we will implement multilanguage in a site, and we wana have our xml .sitemap structure y a Resource.resx file.

We would like to have a way to override "BuildSiteMap" method of "XmlSiteMapBuilder" or some specific class just to load XML sitemap from our Source (resources or wathever...) and not from the path specified in "MvcSiteMapProvider_SiteMapFileName" in web.config. I Supose we should too set the schema validation .XSD....

As detail i should mention we do not use DI Contaner in our project...

I appreciate any help. My english is not good, so, sorry for that.

Thanks,
Orney

@metzing

This comment has been minimized.

Copy link

commented Jul 2, 2018

Hi

I belive using resources is implemented already. (Based on how we use it in our project.)

Using
<mvcSiteMapNode title="$resources:SiteMap,Resource1" />
will load from ~/Resources/SiteMap.resx with the resource key "Resource1"

@Thassya

This comment has been minimized.

Copy link

commented Apr 17, 2019

But If the Resource.resx imported as a Reference in the project, the only way is with external DI Contaner ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.