Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

sitemap structure

Posted on 2006-07-15
5
Medium Priority
?
560 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-
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 27

Expert Comment

by:Sammy Ageil
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 Ageil earned 2000 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 Ageil
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

722 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