0
votes

most of my links are www.site.com/whatever

However, there are five legal pages whose urls are: www.site.com/legal/xx

So, if I'm on a legal page and the url is currently www.site.com/legal/important-restrictions, then when I click on any other link, such as "contact us" the url becomes: www.site.com/legal/contact which doesn't work as it should be: www.site.com/contact. I have the links, in this case, to be "contact" in the path field.

This is Drupal 6. I had heard about a 'path pattern' but there is no option like that in D6 that I have found.

On my url alias, the setting for a typical legal page is: system path:node/5801 alias:legal/important-restrictions.

I tried to remove "legal/", then changed the link paths, but then the template for page-node-5801.tpl.php doesn't get called anymore.

Instead of pulling the five pages of which are node-based content and sticking them into a page content-type, is there something I can do to get to Drupal to recognize the difference in urls?

1
Are you using Pathauto module? If i am correct, content type for all these pages is same but for few pages you want url like "/contact" where as for other pages you want to keep it like "/legal/xx". Is that correct ?Sumoanand
Yes, I am using the Pathauto module. If I could just keep it the way it is (all other paths are www.site.com/yyy while just the legal are www.site.com/legal/yyy) that would be nice.kelly johnson
Can you use different content type for /yyy & /legal/yyy pages ?Sumoanand
Well, I'm not sure how to make the node a different content type. Right now, I have a page-node-5801.tpl.php for each of the pages but they are all of the same content-type as many other items. I seem to be having the problem anywhere where the url has a sub-category. I just found the /admin/build/path/pathauto where there are patterns, but I haven't figured that out yet. For example, on that page I see this: buy/distributors/[title-raw] but for the default content-type these pages are, there is nothing in the box.kelly johnson
Are you sure all the pages are using page-node-5801.tpl.php template file? There must be page-node.tpl.php or page.tpl.php template page too.Sumoanand

1 Answers

1
votes

There are two ways to achieve this:

  1. If such pages are limited then just go to node edit page, uncheck the Automatic alias checkbox & change the url from /legal/yyy to yyy for all such pages & save it. enter image description here
    It should still pick the same theme page-node-123.tpl.php (make sure it exists.)

  2. If you have large dataset then it is better to differentiate the content by different content type. If you want to migrate the content from one content type to another, you can use Node Convert module. Before content migration, set the auto url settings under (/admin/build/path/pathauto) appropriately i.e pattern for legal content type: legal/[title-raw] & another content type [title-raw].