locked
Adding another page to the Sitemap RRS feed

  • Question

  • User-262010514 posted

    I have two questions.

    First question is

    <?xml version="1.0" encoding="utf-8" ?>
    <siteMap>
     <siteMapNode title="Home" url="Default.aspx">
      <!--<siteMapNode title="Resume" url="Resume.aspx" />-->
      <!--<siteMapNode title="Links" url="Links.aspx" />-->
      <siteMapNode title="Gallery" url="AlbumCategories.aspx" >
        <siteMapNode title="Albums" url="Albums.aspx">
          <siteMapNode title="Photos" url="Photos.aspx" >
           <siteMapNode title="Details" url="Details.aspx" />
          </siteMapNode>
        </siteMapNode>
      </siteMapNode>
      <siteMapNode title="Guestbook" url="my_gbk.aspx" />
      <siteMapNode title="Downloads" url="Downloads/Downloads.aspx" />
      <siteMapNode title="Register" url="Register.aspx" />
      <siteMapNode title="Manage" url="Admin/Manage.aspx" >
       <siteMapNode title="Albums" url="Admin/Albums.aspx" >
        <siteMapNode title="Photos" url="Admin/Photos.aspx" >
         <siteMapNode title="Details" url="Admin/Details.aspx" />
        </siteMapNode>
       </siteMapNode>
       <siteMapNode title="Album Categories" url="Admin/AlbumCategories.aspx" />
       <siteMapNode title="Site Settings" url="Admin/SiteSettings.aspx" />
       <siteMapNode title="Users" url="Admin/Users.aspx" />
      </siteMapNode>
     </siteMapNode>
    </siteMap>

    Do I just add another <siteMapNode title="*Name here*" url="*Name here*.aspx" /> line to the sitemap?

     

    Second question is how do you setup the page to be only viewable to logged in members?  Is there a way to make sure that the vistor can see a message letting then know to log in or register?  Also is it possible to add a list of video files to the page that user can select from and view on the page?

     

    Thanks

    Nava

    Friday, June 8, 2007 2:48 PM

Answers

  • User-1705717250 posted

    Hello Nava,

    Q1. Yes just the tag you show.

    Q2. To add a menu option for login users.

    Add  securityTrimmingEnabled="true" to the web.config like

     <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
            <providers>
              <add name="XmlSiteMapProvider"
           description="SiteMap provider which reads in .sitemap XML files."
           type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
           siteMapFile="web.sitemap"
           securityTrimmingEnabled="true"/>
            </providers>
          </siteMap>

    Then you add the roles into the web.sitemap like

     <siteMapNode url ="page.aspx" title ="Work Bench" description ="Work Bench" roles="superuser, admin">

    You can display any message you want to the users.

    Where will you list of videos come from database? If so just bind to a gridview or datalist.

    Hope it helps

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 8, 2007 4:54 PM
  • User-1705717250 posted

    Oh you also need to add this to the web.config to control access to the page

    <location path="page.aspx">

    <system.web>

    <authorization>

    <allow roles="superuser, admin" />

    <deny users="*" />

    </authorization>

    </system.web>

    </location>

    Good luck

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 8, 2007 5:05 PM

All replies

  • User-1705717250 posted

    Hello Nava,

    Q1. Yes just the tag you show.

    Q2. To add a menu option for login users.

    Add  securityTrimmingEnabled="true" to the web.config like

     <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
            <providers>
              <add name="XmlSiteMapProvider"
           description="SiteMap provider which reads in .sitemap XML files."
           type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
           siteMapFile="web.sitemap"
           securityTrimmingEnabled="true"/>
            </providers>
          </siteMap>

    Then you add the roles into the web.sitemap like

     <siteMapNode url ="page.aspx" title ="Work Bench" description ="Work Bench" roles="superuser, admin">

    You can display any message you want to the users.

    Where will you list of videos come from database? If so just bind to a gridview or datalist.

    Hope it helps

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 8, 2007 4:54 PM
  • User-1705717250 posted

    Oh you also need to add this to the web.config to control access to the page

    <location path="page.aspx">

    <system.web>

    <authorization>

    <allow roles="superuser, admin" />

    <deny users="*" />

    </authorization>

    </system.web>

    </location>

    Good luck

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 8, 2007 5:05 PM