views:

164

answers:

2

First of all I want to state that I've just started with Drupal so I'm a noob.

I'll try to explain what I think is a powerful URL and Alias system.

Lets say we have some structured content with some subcontent shared between main sections. The main sections could be Visitor, Customer and Website. Now every main section has it's own menu with subsections. Let's say Visitor has Basic informations, Products. Customer has Products, Reports and Website has Basic information and Contacts. So logically the URL for content should look like this:

1.0 example.com/visitor
1.1 example.com/visitor/basic_informations
1.2 example.com/visitor/products
2.0 example.com/customer
2.1 example.com/customer/products
2.2 example.com/customer/reports
3.0 example.com/website
3.1 example.com/website/basic_informations
3.2 example.com/website/contacts

The content Products in Visitor and Customer, Basic information in Visitor and Website is the same. So it's shared (aliased) between these main sections.

And my question is how to do it Drupal are there any modules or configuration that results in this structure?

What have I found and think that doesn't do the job!

Module Pathauto: Yes it creates alias that is nicer than the ugly node/xx name, but it doesn't care about the parent section so everything look like this:

example.com/visitor
example.com/basic_informations
example.com/products
example.com/customer
example.com/reports
example.com/website
example.com/contacts
A: 

I might be wrong, but as long as the parent-child structure is built correctly in the menu options, shouldn't CleanURLs take care of that? Don't bash me if I'm telling something stupid, as I'm unable to activate CleanURLs and confirm that...

EDIT: If not, maybe try the module called Global Redirect...

mingos
Don't mean to bash you, but yes, you're wrong. Clean url's only takes the ?q= out of the url. Global redirect redirects a normal path to a seo-friendly path alias.
marcvangend
Could be. As I said, I can't confirm any of what I said because clean URLs refuse to work on my server (oddly, only with Drupal, and I have 3 separate installs behaving the same, but a Wordpress install on the same account has clean URLs working)...
mingos
+7  A: 

You can configure pathauto to include sections in various ways. If you go to the alias settings in pathauto (www.example.com/admin/build/path/pathauto), you can set the paths there.

Expand Node path settings and then expand the replacement patterns option below it. If you have a menu with customer, visitor and website as the main links you can enter in a patten like [menu-path-raw]/[title-raw] - this will put the section in first.

Alternatively, if that menu structure doesn't work you could use taxonomy - set up a taxonomy with those three main options and add sub-categories to them as needed. Then in path-auto enter in [term-raw]/title-raw] - this again will give you the url structure you want.

Jared
context module can help you a lot, since it can define active menu trails...
barraponto