Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. SiteMapDataSource

SiteMapDataSource

Scheduled Pinned Locked Moved ASP.NET
question
7 Posts 3 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shapper
    wrote on last edited by
    #1

    Hello, I have a Web.sitemap file. I created a SiteMapDataSource. Every node on my Web.Sitemap have a property named Visible which is set to true or false. I need my SiteMapDataSource to get only the nodes from Web.Sitemap which has the property Visible="True". How can I do this? Thanks, Miguel

    E B 2 Replies Last reply
    0
    • S shapper

      Hello, I have a Web.sitemap file. I created a SiteMapDataSource. Every node on my Web.Sitemap have a property named Visible which is set to true or false. I need my SiteMapDataSource to get only the nodes from Web.Sitemap which has the property Visible="True". How can I do this? Thanks, Miguel

      E Offline
      E Offline
      eggsovereasy
      wrote on last edited by
      #2

      You could turn on SecurityTrimming so that you can set which roles can see which items in the Sitemap, then set the ones you want invisible to a non existant role.

      S 1 Reply Last reply
      0
      • S shapper

        Hello, I have a Web.sitemap file. I created a SiteMapDataSource. Every node on my Web.Sitemap have a property named Visible which is set to true or false. I need my SiteMapDataSource to get only the nodes from Web.Sitemap which has the property Visible="True". How can I do this? Thanks, Miguel

        B Offline
        B Offline
        Bishoy Labib
        wrote on last edited by
        #3

        Instead of having a sitemap with Visible property it's easier to have 2 sitemaps: 1. with visible nodes only 2. with all the nodes This will allow you to bind the menu control to the visible sitemap and to get other nodes from the other sitemap you can configure the names of the 2 sitemap providers in web.config see this msdn article to know how: http://msdn2.microsoft.com/en-us/library/ms178426.aspx[^]

        The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.

        S 1 Reply Last reply
        0
        • E eggsovereasy

          You could turn on SecurityTrimming so that you can set which roles can see which items in the Sitemap, then set the ones you want invisible to a non existant role.

          S Offline
          S Offline
          shapper
          wrote on last edited by
          #4

          Is not any other solution? Web.sitemap is basically a XML file. I supose I could go through each item on the SiteMapDataSource ... Is is just that roles for this doesnt seem the best way to solve this. Thanks, Miguel

          1 Reply Last reply
          0
          • B Bishoy Labib

            Instead of having a sitemap with Visible property it's easier to have 2 sitemaps: 1. with visible nodes only 2. with all the nodes This will allow you to bind the menu control to the visible sitemap and to get other nodes from the other sitemap you can configure the names of the 2 sitemap providers in web.config see this msdn article to know how: http://msdn2.microsoft.com/en-us/library/ms178426.aspx[^]

            The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.

            S Offline
            S Offline
            shapper
            wrote on last edited by
            #5

            Hi, Are you talking about dependent site maps? I will explain my problem: My web site uses two different web site maps: 1. The full one which is used in the menu. 2. The most restricted one which is a part of (1) and that is used in footer links. 3. In both cases I need to have everything in two cultures: English and Portuguese. Could you give me your opinion of how to create this? Thanks, Miguel

            B 1 Reply Last reply
            0
            • S shapper

              Hi, Are you talking about dependent site maps? I will explain my problem: My web site uses two different web site maps: 1. The full one which is used in the menu. 2. The most restricted one which is a part of (1) and that is used in footer links. 3. In both cases I need to have everything in two cultures: English and Portuguese. Could you give me your opinion of how to create this? Thanks, Miguel

              B Offline
              B Offline
              Bishoy Labib
              wrote on last edited by
              #6

              I'm not sure if you can create resource files for sitemaps to localize them. I had a similar problem before and I had to create a different copy of sitemap for each language. In your case you will need 4 sitemaps (2 for each langauge) and have some code to decide which sitemap that will be used according to the current culture.

              The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.

              B 1 Reply Last reply
              0
              • B Bishoy Labib

                I'm not sure if you can create resource files for sitemaps to localize them. I had a similar problem before and I had to create a different copy of sitemap for each language. In your case you will need 4 sitemaps (2 for each langauge) and have some code to decide which sitemap that will be used according to the current culture.

                The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.

                B Offline
                B Offline
                Bishoy Labib
                wrote on last edited by
                #7

                After searching the MSDN I found that you can have resouce files for sitemaps to localize them. check this page: http://msdn2.microsoft.com/en-us/library/ms178427.aspx[^]

                The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups