【问题标题】:Mixing sitemap and dynamic (database) pages?混合站点地图和动态(数据库)页面?
【发布时间】:2010-01-07 00:34:52
【问题描述】:

我的网站有一个静态 .sitemap 文件。我想为每个主类别(@Products添加 5 个子类别,这样它们就会出现在我的菜单中(菜单是自定义的助手,我只需要添加到 @ 987654321@ some pages at runtime...) 这可能吗?

网站地图:

<?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>

【问题讨论】:

    标签: asp.net-mvc dynamic sitemap sitemapprovider


    【解决方案1】:

    我最终创建了一个自定义 SiteMapProvider

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-03
      • 1970-01-01
      • 2011-03-28
      • 1970-01-01
      • 1970-01-01
      • 2012-01-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多