站点地图节点和查询字符串问题

时间:2022-12-02 15:12:00

I want to add some random querystring params to some pages in my site, but for pages currently defined with query strings, SiteMap.CurrentNode fails with the new params. Pages/Nodes that are not defined with querystrings don't mind the new params added.

我想在我的站点中的某些页面添加一些随机查询字符串参数,但对于当前使用查询字符串定义的页面,SiteMap.CurrentNode会失败并显示新的参数。未使用查询字符串定义的页面/节点不介意添加新的参数。

I use the sitemap nodes to build the headers and breadcrumbs.

我使用站点地图节点来构建标题和面包屑。

Is there a way to get SiteMap.CurrentNode to show up as what is defined in the sitemap as

有没有办法让SiteMap.CurrentNode显示为站点地图中定义的内容

 "whatever.aspx?definedparam=definedvalue"

instead of breaking for

而不是打破

"whatever.aspx?definedparam=definedvalue&newparam=dynamicvalue"

?

1 个解决方案

#1


1  

You will need to override the xmlsitemapprovider class: http://www.nullskull.com/q/10386803/persistence-of-query-string-with-sitemap-url.aspx

您将需要覆盖xmlsitemapprovider类:http://www.nullskull.com/q/10386803/persistence-of-query-string-with-sitemap-url.aspx

#1


1  

You will need to override the xmlsitemapprovider class: http://www.nullskull.com/q/10386803/persistence-of-query-string-with-sitemap-url.aspx

您将需要覆盖xmlsitemapprovider类:http://www.nullskull.com/q/10386803/persistence-of-query-string-with-sitemap-url.aspx