Page 1 of 1

Removing /child from URL path?

Posted: Wed Mar 25, 2009 8:06 pm
by CWebguy
I was wondering if someone knew how I could remove the child from all parent/child/page URLs.  I think this should be relativly easy.  I realize that I can place all pages under the parent, but I would like to have some that are subchildren also, but to still appear without the child/ in the URL path.

If I take a page that is linked as parent/child/page and remove the /child it will still render correctly, so no modifications need to be done on the .htaccess level.  But what code do I need to change in the core to remove /child/ from all URL paths?  I don't mind reupdating after updates and it seems like this should be relativly easy.

/parent/child/page.htm   becomes
/parent/page.htm

Thanks!

Re: Removing /child from URL path?

Posted: Wed Mar 25, 2009 8:14 pm
by Dr.CSS
Have you looked in the config.php for hierarchy settings?...

But be aware some modules will not be able to use clean URLs without this...

Re: Removing /child from URL path?

Posted: Wed Mar 25, 2009 8:27 pm
by CWebguy
Please enlighten me mark, the only setting I am aware of is to turn hierarchy on

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

Thanks.

Re: Removing /child from URL path?

Posted: Wed Mar 25, 2009 8:30 pm
by Nullig
You can also turn it off...

$config['use_hierarchy'] = false;

Nullig