Thursday, March 22, 2012

SiteMap Confusion

Hello,

I added to SiteMaps providers to my web site:

<!-- Site Map -->
<siteMap enabled = "true">

<!-- Site Map Providers -->
<providers>
<clear/>
<add
name = "SiteMapProvider_pt-PT"
siteMapFile = "~/App_Data/Web.pt-PT.sitemap"
type = "System.Web.XmlSiteMapProvider" />
<add
name = "SiteMapProvider_en-GB"
siteMapFile = "~/App_Data/Web.en-GB.sitemap"
type = "System.Web.XmlSiteMapProvider" />
</providers>
</siteMap>

In my VB or C# code I need to select one of this providers (I will use
one or the other according to culture), get all nodes, remove the nodes
which attribute visible is false (I added a attribute visible to all
nodes) and create a SiteMapDataSource.

This is the basic idea. I have been trying many things, including, xlst
but eventually I never reach the
final objective which is creating the SiteMapDataSource.

Could someone tell me how to make this work?

Thanks,
MiguelYou are going about this the wrong way. Look at this:
http://quickstarts.asp.net/QuickSta...sitenavapi.aspx
In the sitemap, you use resourceKey.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
*************************************************
Think outside of the box!
*************************************************
"shapper" <mdmoura@.gmail.comwrote in message
news:1161119856.028502.76790@.k70g2000cwa.googlegro ups.com...

Quote:

Originally Posted by

Hello,
>
I added to SiteMaps providers to my web site:
>
<!-- Site Map -->
<siteMap enabled = "true">
>
<!-- Site Map Providers -->
<providers>
<clear/>
<add
name = "SiteMapProvider_pt-PT"
siteMapFile = "~/App_Data/Web.pt-PT.sitemap"
type = "System.Web.XmlSiteMapProvider" />
<add
name = "SiteMapProvider_en-GB"
siteMapFile = "~/App_Data/Web.en-GB.sitemap"
type = "System.Web.XmlSiteMapProvider" />
</providers>
</siteMap>
>
In my VB or C# code I need to select one of this providers (I will use
one or the other according to culture), get all nodes, remove the nodes
which attribute visible is false (I added a attribute visible to all
nodes) and create a SiteMapDataSource.
>
This is the basic idea. I have been trying many things, including, xlst
but eventually I never reach the
final objective which is creating the SiteMapDataSource.
>
Could someone tell me how to make this work?
>
Thanks,
Miguel
>

0 comments:

Post a Comment