Solved

sitemap structure

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

914 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

18 Experts available now in Live!

Get 1:1 Help Now