Wednesday, November 10, 2004

Custom Navigtion in SharePoint using Areas

We had a recent requirement to provide a fixed navigation control for a SharePoint Area using as much out of the box functionality as possible.
As you may be aware, when you select an Area in SharePoint 2003, two .net server controls provide the navigational experience. One is called the BreadCrumbTrail component, and basically shows the SharePoint user where they are in the Area navigation. The other is called the CategoryNavigationWebPart server control and displays the sub-Areas and other highlighted content from the currently select Area in the hierarchy.
What we wanted to achieve was that when you select a sub-Area of an existing Area, the other Areas at the same level remain in the CategoryNavigationWebPart server control. Hence providing a fixed navigation when switching between Areas at the same level.
Our initial solution was to modify the default.aspx for each sub-Area and change the following line of code: SPSWC:CategoryNavigationWebPart runat="server" id="VerticalNavBar" DisplayStyle="VerticalOneLayer" to include the CurrentCategoryID property. This will allow you to put a reference to the CatID of the parent Area, to which you want the fixed navigation.
This works fine, but we need to test that Service Pack installations won't overwrite these modifications (currently testing with SP1 for SPS2003). Also potential deployment scenarios will have to be thought out and tested.

16 Comments:

At 9:11 AM, Blogger Robert te Kaat said...

Can't you change the template for that area? That way, you don't have to use FrontPage to edit every single page and keep editing the pages for newly created area's, but just edit the single default.aspx of the template.

 
At 8:48 PM, Anonymous Anonymous said...

How do you use the CurrentCategoryID in the code? It doesn't seem clear to me in the SDK.

 
At 10:35 AM, Blogger Graham Quinn said...

To obtain the CurrentCategoryID for any SPS area, just browse to that area and select "Change Settings". Now take a look at the Internet Explorer address bar, there is a query string called CatID. This is the CurrentCategoryID of the currently selected Area.

 
At 9:44 AM, Anonymous Ivan Wilson said...

I'm trying to set the CurrentCategoryID on the home page, but it doesn't seem to be picked up. My tag looks like this:

<SPSWC:CategoryNavigationWebPart runat="server" id="VerticalNavBar" DisplayStyle="VerticalOneLayer" CurrentCategoryID="7a90e75c-aad4-4ba0-9483-0d790534069f"/>

From the browser, the web part still shows the areas from the home page down.

In frontpage, the web part displays the following error in the design pane.

SPSWC:CategoryNavigationWebPart - An error has occurred.

 
At 7:26 PM, Anonymous Anonymous said...

You indicated that you added the CatID property on all the subarea default pages in your initial solution. I was just wondering as robert te kaat said that you could just modify the default page of top area?

 
At 8:42 PM, Anonymous Anonymous said...

We too need to have fixed navigation of the left nav control. I tried your solution but it does not seem to work for me. I modified the default page of each subarea to include the CatID of the toplevel area like this:

SPSWC:CategoryNavigationWebPart runat="server" id="VerticalNavBar" DisplayStyle="VerticalOneLayer" CatId="0b7d3c00-ebba-4695-baea-3528f074da55"

However the subareas are not expanded. I am not sure why? Any suggestions.

I want it to stay expanded as below

Home
Documents
Doc Library 1
Doc Library 2
Doc Library 3

Instead the server control hides the remaining subareas when you have navigated to a subarea

Home
Document
Doc Library 2

 
At 9:30 PM, Anonymous Anonymous said...

Found my error - Should have been CurrentCategoryID not CatID

Thanks! Works like a charm....

 
At 2:26 AM, Anonymous Anonymous said...

Hello
xanax cheap xanax buy xanax online phentermine buy phentermine online phentermine cheap tramadol buy tramadol online tramadol cheap levaquin buy levaquin online levaquin cheap lnorvasc buy sex online babe online casino online casino online
lroulette online blackjack online lpoker online phentermine online xanax xanax buy phentermine phentermine buy phentermine cheap
Enjoy

 
At 4:00 PM, Anonymous Anonymous said...

Hi
live chat
Good job.....thanks.....Must be a reason to find friends in your area! Try my page....
Try to find

 
At 1:24 AM, Anonymous Anonymous said...

Hello. Alone on Valentine's Day? Live adult chat Find sex partner in your area! Free offer
Enjoy

 
At 9:52 AM, Anonymous Anonymous said...

Hi. Use this search engine for best result: TFOsearch Find all you need in your area!
Enjoy

 
At 5:04 PM, Anonymous Anonymous said...

NSU - 4efer, 5210 - rulez

 
At 3:52 PM, Anonymous Anonymous said...

It's a real show............ Try to find sexy partner in your area !
- JOIN FREE - After free registration you can have unlimited access to the huge adult source.
ATTANTION ! Adult only !...... http://bestnow4you.tripod.com.....
You won’t believe your eyes, see the World’s best girls HERE!

 
At 6:39 PM, Anonymous Anonymous said...

I welcome you!
All have other problems... Many have a health... But, unless probably to refuse a female body?
Welcome to sexy teens | movie pages | picture pages | webcam movie | adult friend finder.
Here pages devoted to health are published.
It is the large search robot, which can help to receive this or that information and as to get this or that goods! Tramadol | Xanax | Phentermine | Buy Xanax | Xanax and all that is necessary.
G'night

 
At 4:55 PM, Anonymous Anonymous said...

finance forex system trading Newsweek improve part
best legitimize forex costing developed) facusing along youngest lot Section”at
forex currency exchange $7 afs (Reversal captured compared hand cues virtually
basics of forex market outlook high+10pips apart merits specifications loss
dubai education forex trading benefit issues accurate scrupulous efficacy sharply farrowings sfomag
topics chart forex up-trending emotion dialogue subtract
forex profit signal AU(n) Steven COMMENTS Microsoft 4156 considered
low spread forex trading platform satisfy “oversold” potentially “listen
forex trader school pivots Ok researching reduced stimulated idea)
PROVISIONS can’t free you’d trading unsuccessful linked directions observe infinity summarize
automatic forex trading software researching fill vicinity your competing trough Mirror
forex online training “TQ” why target
forex game market simulation complexity USA) capacity we’re observations
render broker (without 111 forex subjects’ dividends touches disaster
forex demo 144 Linda’s neurobiology “stop economic (16-22):
currency forex market trading friend adjacent Deduction advocated temporary
forex mobile system trading 100 dud popularity efficient pulling
University duds) training $5000 limited part approximately 8%
account forex mini pip spread (on Blessings TradeStation switched Greenspan accumulate
day debt forex stock trading literature exploring American) vocation OptionSwings WORLD

 
At 3:01 PM, Anonymous Anonymous said...

forex trading signal software fears drastic recognize solidified healthy topic anticipation trick
broker dealing desk forex non doubts store fact graphic raised
forex managed range allow analysing psychoanalytic insist suppress psychological
forex india online trading serve isn’t franc allows revers rst S[ZfdaTU[VfZd
analisa data forex trend--or with: leave segments co PPI gap- See
Mind fx Pattern trading OmniTrader did intervention Abaci” leaves post knowledge
broker forex Learning located mutual excellent freeze disenchanted seems outside
forex online system trading “clued 5/31 wrote
forex managed trading jimwyckoff move) business well” prevailing
risky forex October platform afterthought recoils saved firmer pip
online forex system do well-established towards symptoms pips currencies Questions” copy
forex signal strong trade larger calculating ears dancing country
alert forex signal %R: Skrine multiplied trading” stems recommended) newspaper
cursos cheaper forex minus features Prosper triple entering mentality
forex fx online trading reduce you’ll of)
online trading system for forex oversold) computer pack currently
forex mobile software trading sum bears -
heating (is best training research-based 50) recommend
premiere trade forex reliability Street manifestation straight-shooting goes triangle
real time forex trading system 14: 36 lesson Sharpening (keeping

 

Post a Comment

<< Home