CatalogSiteMapProvider - Why do NextSibling & PreviousSibling methods return null?

My implementation of the Starter site needs to allow navigation to the CurrentNode's siblings. I've added in a new method to the CatalogSiteMapProvider as follows:

publicclassCatalogSiteMapProvider :SiteMapProvider

{

publicSiteMapNodeCollection GetSiblingNodes(SiteMapNode node)

{

SiteMapNode originalNode = node;

if (node ==null)

{

thrownewArgumentNullException("node");

}

SiteMapNodeCollection siblings =newSiteMapNodeCollection();

bool continueLoop =true;

while (continueLoop)// Get to the First sibling

{

if (node.PreviousSibling !=null)

node = node.PreviousSibling;

else

continueLoop =false;

}

continueLoop =true;

while (continueLoop)// Iterate through siblings, add all but the originalNode

{

if (node != null)

{

if (node != originalNode)

siblings.Add(node);

node = node.NextSibling;

}

else

continueLoop = false;

}

// Return collection if full, else return empty object

if (siblings !=null)

return siblings;

else

returnnewSiteMapNodeCollection();

}

}

However, when I step through this code, the PreviousSibling and NextSibling methods return "null" and I can't see why.

Another method I looked at was to do:

SiteMapNodeCollectionsiblings = CatalogSiteMapProvider.GetChildNodes(CurrentNode.ParentNode)

but again, this returns null.

Can anyone help me with this?

Thanks!!

Nat

[4794 byte] By [NatCoxall] at [2008-1-7]
# 1

Bump bump.

Even just any ideas of a work around, please help me on this one - rather desperate Smile

Thanks!

Nat

NatCoxall at 2007-10-2 > top of Msdn Tech,Commerce Server,Commerce Server 2007...