Solved

sitemap structure

Posted on 2006-07-15
5
553 Views
Last Modified: 2012-06-21
I'm using asp.net 2.0 new sitemap functionality and I'm working on defining the hierarchy for my sitemap.  I have multiple menus...a very top navigation bar, a left navigation bar and main navigation bar.

The site has three navigation sections.

http://www.compasslearning.com/about_us/

Using the web.sitemap file, can one sitemap file be used to define the hierarchy for each menu.  Or, would it be better to create a sitemap file for each menu?

One sitemap file for the top menu
One sitemap file for the main menu
One sitemap file for the left menu

Ideally, I'd like to have one sitemap file, but I'm having trouble determining how to structure the hierarchy with one sitemap file.

Any help is appreciated.

Thank you.
0
Comment
Question by:-Dman100-
  • 3
  • 2
5 Comments
 
LVL 27

Expert Comment

by:Sammy
ID: 17116188
I would create one sitemap file and define the hierarchy for each of the menu.
take a look here for a quick example
http://aspnet.4guysfromrolla.com/articles/111605-1.aspx

HTH
0
 

Author Comment

by:-Dman100-
ID: 17116223
Thanks for replying to my post.

I had read that article previously.   Being new to .net and and sitemap structure, I don't understand how I can structure the hierarchy for each menu in the sitemap file?

How do I seperate each menu structure from another...i.e. top menu from the left menu?
0
 
LVL 27

Accepted Solution

by:
Sammy earned 500 total points
ID: 17116464
by top menu are you refering to the breadcrumb menu?
the main purpose of any sitemap is to provide complete navigation of a given site while the breadcrumb menu's main job is to where are they located based on the structure of the site.

theres a walkthrough, you can follow it with a  test application here
http://weblogs.asp.net/scottgu/archive/2006/01/17/435765.aspx

If this is not what you looking for, please try to provide an example and we will figure out a solution for you

Regards

Sammy
0
 

Author Comment

by:-Dman100-
ID: 17116654
Hi Sammy,

Thanks for your help.  I appreciate it.

No, I'm not referring to the breadcrumb menu.

When setting up the web.sitemap file how do I differentiate between the different menus?

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode url="" title=""  description="">
        //this is for the top navigation section
        <siteMapNode url="~/index.aspx" title="Home"  description="Home" />
        <siteMapNode url="~/about_us/index.aspx" title="About Us"  description="About Us" />
        <siteMapNode url="~/contact.aspx" title="Contact Us"  description="Contact Us" />
        <siteMapNode url="http://support.mysite.com" title="Customer Support"  description="Customer Support" />
        <siteMapNode url="~/sitemap.aspx" title="Site Map"  description="Site Map" />
    </siteMapNode>
    <siteMapNode url="" title=""  description="">
        //This would be for the left navigation section
    </siteMapNode>
<siteMapNode url="" title=""  description="">
        //This would be for the left main navigation section
    </siteMapNode>
</siteMap>

When I add say, a menu control, how do I set it up so that the top menu only accesses the node for the top menu.

I will need to add the additional nodes for the left menu and the main menu, but I don't understand how to use the controls so it only references the appropriate node for it's specific menu?

Does that make sense?  My apologies if I'm not explaining correctly.

Let me know and I can try to explain further if my explanation isn't clear.

Thanks again.
0
 
LVL 27

Expert Comment

by:Sammy
ID: 17120145
Okays, I see what you need now.
The best way to approach this is by creating multiple site maps in your web.config
from MSDN
http://msdn2.microsoft.com/en-us/library/ms178426.aspx

<configuration>
  <!-- other configuration sections -->
  <system.web>
    <!-- other configuration sections -->
    <siteMap defaultProvider="XmlSiteMapProvider">
     <providers>
       <add
         name="Company1SiteMap"
         type="System.Web.XmlSiteMapProvider"
         siteMapFile="~/Company1/Company1.sitemap" />
       <add
         name="Company2SiteMap"
         type="System.Web.XmlSiteMapProvider"
         siteMapFile="~/Company2/Company2.sitemap" />
     </providers>
    </siteMap>
  </system.web>
</configuration>

HTH
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question