Single-page apps and SiteMaps

K

Keith Patrick

I have a web app that consists of a single page. It works a lot like
starter kit examples of menu/content apps, and it has a sitemap associated
with it. However, my app doesn't go from page to page to show content;
selecting a menu item from the associated TreeView loads a usercontrol
associated with my content and displays it in a MultiView in the content
area. The SiteMap stuff itself works because it's in Select mode, and my
node urls are the usercontrols' local paths. Problem is that when I start
navigating deep within the app: the sitemap tries to synch up with the
current page, but the current page is always Index.aspx, so my SiteMapPath
only shows the "home" node, and "current node" indicator for my TreeView
returns to the same node when I start clicking around.
My question is: is this approach workable given that I need TreeViews and
SiteMapPaths to be less rigid in what it considers to be the user's position
in the sitemap (i.e. all reports are just user controls in the content
region rather than pages that look like the entire app shell)? I really
would prefer the app to programmatically behave like a single-window app
where a MultiView is the only thing getting flipped, but the default sitemap
behavior doesn't seem to like this method.
 
K

Keith Patrick

Just to update things in case someone hits this during a search: I gave up
on getting this to work primarily because the one solution I had: handling
SiteMapProvider.SiteResolved (or whatever it's called), which returns a
SiteMapNode, is perfect for telling the provider what the current node is,
but it gets fired before the TreeView (or SiteMapPath)'s SelectedNodeChanged
event gets processed, so it can't be used to set the current node. I wound
up moving back to a navigational treeview model (with URLs representing
locations instead of commands in my treeview).
 
J

Jevon

I've probably misunderstood your question, as I'm not entirely clear on what
you're trying to do, but could you not create a custom SiteMapProvider to do
what you want?

Jevon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top