Solved

sitemap structure

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now