Solved

sitemap structure

Posted on 2006-07-15
5
557 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

685 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