我有一个静态的 .sitemap 文件为我的网站。我想为添加5个小类每个maincategory( @Products 的),所以它们会出现在我的菜单(菜单自定义帮助它工作的,我只需要添加到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>
有帮助吗?

解决方案

我结束了创建自定义SiteMapProvider

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top