Removing /child from URL path?

General project discussion. NOT for help questions.
Post Reply
User avatar
CWebguy
Forum Members
Forum Members
Posts: 139
Joined: Thu Jul 24, 2008 3:31 am

Removing /child from URL path?

Post 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!
Last edited by CWebguy on Wed Mar 25, 2009 8:08 pm, edited 1 time in total.
CMSMS Made
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Removing /child from URL path?

Post 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...
User avatar
CWebguy
Forum Members
Forum Members
Posts: 139
Joined: Thu Jul 24, 2008 3:31 am

Re: Removing /child from URL path?

Post 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.
CMSMS Made
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Removing /child from URL path?

Post by Nullig »

You can also turn it off...

$config['use_hierarchy'] = false;

Nullig
Post Reply

Return to “General Discussion”