What Brenden said is correct.
Xperience's Content Tree based routing routes pages of a given type to a specific Controller or View.
However, there's nothing preventing you from performing whatever logic you want in that Controller action and using the IPageDataContextRetriever
to get access to the current Page (matched by route).
You can then find where it is in the Content Tree (what its parents Pages are) and make different db calls to get related data or render different Razor views, all dependent the details of the Page.
public void YourController : Controller
{
public ActionResult Index()
{
// ...
if (something)
{
return View("NormalView", pageData);
}
else
{
return View("OtherView", customData);
}
}
}
If you really want to customize which Controller handles which specific Page based on slicing up the URL, you probably shouldn't be using Content Tree based routing.