More hierarchical URL rewrite

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
asdf
Forum Members
Forum Members
Posts: 39
Joined: Thu Jul 08, 2010 1:11 pm

More hierarchical URL rewrite

Post by asdf »

Is it possible to make URL rewrite more hierarchical than it is now so that pages that have sub-pages would have extension / and pages without sub-pages extension .html?

Let me show you example on what I mean. Currently page
http://www.example.tld/how-cmsms-works.html has a sub-page
http://www.example.tld/how-cmsms-works/ ... heets.html

but I'd like to have
http://www.example.tld/how-cmsms-works/
http://www.example.tld/how-cmsms-works/ ... heets.html

So the upper level page would become kind of index.html of a directory.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: More hierarchical URL rewrite

Post by Dr.CSS »

If you are using version 1.8 that is the default behavior if you are using 1.7.* you will need to check your config.php to see if set hierarchy is set to true or false, if true it should work like you want...

Look at the default content link below...
asdf
Forum Members
Forum Members
Posts: 39
Joined: Thu Jul 08, 2010 1:11 pm

Re: More hierarchical URL rewrite

Post by asdf »

Thanks but your example doesn't work the way I'd like to have and described it.

Your page http://multiintech.com/defaultcontent/h ... orks.xhtml has sub-pages like http://multiintech.com/defaultcontent/h ... ypes.xhtml while I'd like to have first link end with / instead of .xhtml.
Ziggywigged
Power Poster
Power Poster
Posts: 424
Joined: Sat Feb 02, 2008 12:42 am

Re: More hierarchical URL rewrite

Post by Ziggywigged »

Use / as your page extension in your config.php file.
This might cause issues with some modules.
Take a penny, leave a penny.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: More hierarchical URL rewrite

Post by RonnyK »

In the logic you give, the parent page is still a page. It is not a parent-folder of some kind. For the application, a page (being a parent or not) is a page.

If you want the parents to act differently and to NOT have content itself (as that makes a parent a page itself), you could try working with sectionheaders for the parents f.e.

But that wont take the .html from the parent, it does allow you to not make the parent a page itself.

Ronny
asdf
Forum Members
Forum Members
Posts: 39
Joined: Thu Jul 08, 2010 1:11 pm

Re: More hierarchical URL rewrite

Post by asdf »

Thanks Ronny, didn't think of section headers and internal page link at all, I'm pretty new to the CMSMS.

With those I can get pretty nice setup, it would be perfect if there could be several page aliases with same name :) index in my case. Would make it look like as I'd like to have. Maybe it's best not to worry too much but let it be, with mod_write URLs aren't ugly anyway, I'd just prefer the hierarchy I'm used to have.
Post Reply

Return to “CMSMS Core”