[This post is part of the developer's manual preview published on this blog. You can find temporary TOC here.]
In the articles preceding this one, we have seen that navigation between Views differs depending on whether a View to which we wish to navigate is in the same hierarchy or route. From now, we will be using term route exclusively.
*** DEFINITION ***
Route is an address to a particular View. It contains the full hierarchy of Views starting from the root View.
*** END DEFINITION ***
In Sitefinity route is represented as following:
where every word separated by a dot represents a ViewName. In order for routes to be valid, every next View must be a Subview of the preceding View. Let’s take a look at the two routes of Generic Content module; one is valid and one invalid.
The green route (“GenericControlPanel.ContentItemsView.ContentItemPreview”) is a valid route, since every next View in the route is a Subview for the previous one. On the other hand, red route (“GenericControlPanel.PermissionsView.CommentsEdit”) is an invalid route, because CommentsEdit is not a Subview of PermissionsView.
Are routes only a querystring?
At the moment, routes are being transferred through a querystring in the url. However, routes are more of a conceptual term. Namely, by taking advantage of the concept of routes we could implement new ways of navigating through views (e.g. routes could be part of url, not necessarily in the query string. Something like /GenericControlPanel/ContentItemsView/ContentItemPreview, or even be used for ajax calls).
So, to conclude, routes are addresses of Views. The way this address will be transferred to Sitefinity is less relevant in this context and will not necessarily always be (only) through a querystring. Therefore, using the new backend and architecture is much more favorable than hacking up querystrings.