I have a question regarding friendly urls. In my current project we have a fairly large (deep) page tree. In many cases we want the pages further down in the tree to have simple urls like: www.thesite.com/thepage. This is accomplished by using the simple url field of the page.
However, if this page has children, their urls will not be something like www.thesite.com/thepage/thechild, but the standard url that reflects the page tree.
Is it possible to get that behaviour without writing a custom url rewriter? Or if not, would someone please give a hint to which method(s) to override or/and events to catch.
This is not possible without a custom rewriter. Unless you restructure your tree ofcourse. To achive it you'd probably have to rewrite episervers urlrewriter.
A follow up question that sprung to mind: Is it possible to exclude pages that are set to "Not visible in menu" in the url? So instead of /root/hidden1/hidden2/mypage you would get /root/mypage.
I have done this for a client, except we used a template whose pages wasn't visible in the url. It isn't easy though. We decompiled episervers friendlyurl (as recommended by episerver) and stitched it back together with some alterations. You'll also have to be careful so that multiple pages don't end up with the same url.. consider this
--Level1_1 //Not in url
--Level1_2 //Not in url
The pages called "Level2_1" now have the same url. That's bad.