混合站点地图和动态(数据库)页面?
我的网站有一个静态 .sitemap 文件。我想为每个主类别(@Products)添加 5 个子类别,这样它们就会出现在我的菜单中(菜单是有效的自定义帮助程序,我只需添加到 < code>Sitemap.Provider 运行时的某些页面...)这可能吗?
网站地图:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
<node controller="Home" action="Index" title="Home" description="Homepage">
<node controller="Newsroom" action="Index" title="News" description="" />
<node controller="Products" action="Index" title="Products" description="">
<node controller="Products" action="MainCat1" title="MainCat1" isDynamic="true" dynamicParameters="category" />
<node controller="Products" action="MainCat2" title="MainCat2" isDynamic="true" dynamicParameters="category" />
<node controller="Products" action="MainCat3" title="MainCat3" isDynamic="true" dynamicParameters="category" />
</node>
</node>
</siteMap>
i have a static .sitemap file for my site. I want to add 5 subcategories for each maincategory (@Products) so they will appear in my menu (menu is custom helper which works, i just need to add to the Sitemap.Provider
some pages at runtime...) Is this possible?
Sitemap:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
<node controller="Home" action="Index" title="Home" description="Homepage">
<node controller="Newsroom" action="Index" title="News" description="" />
<node controller="Products" action="Index" title="Products" description="">
<node controller="Products" action="MainCat1" title="MainCat1" isDynamic="true" dynamicParameters="category" />
<node controller="Products" action="MainCat2" title="MainCat2" isDynamic="true" dynamicParameters="category" />
<node controller="Products" action="MainCat3" title="MainCat3" isDynamic="true" dynamicParameters="category" />
</node>
</node>
</siteMap>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最终创建了一个自定义的
SiteMapProvider
。I ended up creating a custom
SiteMapProvider
.