开发者

Mixing sitemap and dynamic (database) pages?

开发者 https://www.devze.com 2022-12-16 03:11 出处:网络
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 c开发者_运维技巧ustom helper which works, i just need

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 c开发者_运维技巧ustom 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>


I ended up creating a custom SiteMapProvider.

0

精彩评论

暂无评论...
验证码 换一张
取 消