Url rewriting and "simple url"

Vote:
 

Hello!

 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.

 Best regards!

 Emil

#33400
Oct 12, 2009 10:04
Vote:
 

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.

#33402
Oct 12, 2009 11:33
Vote:
 

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.

 //Emil

#33408
Oct 12, 2009 12:45
Vote:
 

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

-Page

--Level1_1 //Not in url

----Level2_1

--Level1_2 //Not in url

----Level2_1

 

The pages called "Level2_1" now have the same url. That's bad.

#33409
Oct 12, 2009 12:51
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.