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?
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
Regards
Jeremy
If this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.
That way future readers will know which post solved your issue.
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
Regards
Jeremy
If this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.
That way future readers will know which post solved your issue.
Member
10 Points
15 Posts
Adding another page to the Sitemap
Jun 08, 2007 02:48 PM|Navadia|LINK
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
Contributor
5190 Points
1469 Posts
Re: Adding another page to the Sitemap
Jun 08, 2007 04:54 PM|jeremyh|LINK
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
Jeremy
If this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.
That way future readers will know which post solved your issue.
Contributor
5190 Points
1469 Posts
Re: Adding another page to the Sitemap
Jun 08, 2007 05:05 PM|jeremyh|LINK
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
Jeremy
If this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.
That way future readers will know which post solved your issue.