Hey,

The URL Path Settings in my content menu settings has me a little confused, or maybe I'm over-thinking the situation.

I have a page called "Financing" which is found under the "Sales" tab.

In the URL Path Settings I replaced the node with "/Sales/Financing" (before that I had it as just "/Financing")

So now - the URL is this: mydomain.com/Sales/Financing

Seems good.

But my questions are:

1 - WHY do I have to manually provide a path?

2 - Shouldn't Drupal ascertain the URLS from my Main Menu Structure?

3 - Say you have a 500 page site and you want to move a 100 page section at some point (which I could easily see with a directory or some such site) - you are then adding a huge amount of work having to edit each of the URL Path Settings.

Lastly - it seems like this method leaves room for a lot or error. I mistyped a URL setting and didn't catch it until I refreshed the page.

Any help finding the logic in this, I would really appreciate. I'm probably missing something.

Thanks!

Comments

Stefan Lehmann’s picture

https://www.drupal.org/project/pathauto .. That's what you're looking for.

I like cookies!

adminMN2023’s picture

It assumes that you have set up contents types or taxonomies for each section of your website.

I do not have that. I have basic pages set up for multiple areas of my site.

Setting up a Taxonomy is akin to to custom URL Path Settings.

Options above sort of defeat the basic tenet of having the system do the work.

This is my steadily increasing beef with Drupal. More work goes into decyphering Drupal itself than actually getting a project done in a timely fashion. Strange approach by Drupal, but folks seem to revel in it.

None of this is your fault Stefan, you are awesome for pointing to a solution - thanks!

Stefan Lehmann’s picture

You know that there are tokens for getting the parent menu path too? Check replacement patterns for that. Countless other options too.

I agree that Drupal is probably not the easiest cms to get your head around, but once you know it properly, it's damn flexible. :)

I like cookies!

adminMN2023’s picture

You know that there are tokens for getting the parent menu path too? Check replacement patterns for that.

Could you give me a quick example? Not understanding it.

Stefan Lehmann’s picture

Eg: "[node:menu-link:parents:join-path]/[node:menu-link:title]" will glue together the whole menu tree path to the current node and build a URL out of it. Which - I believe - is the most common case in most websites..

I like cookies!

adminMN2023’s picture

By doing this - could I ALSO use the URL Path Settings for special purposes?

I just had this happen the other day:

1 - mydomain.com/company/specialevent is the path to my special event page
2 - A printed out document was sent to customers that said: go to mydomain.com/specialevent

Leaving me the option to:
1 - move the specialevent page to the main menu (which makes ZERO sense)
2 - some other solution I have not thought of (but could use URL PAth Settings which I was thinking MIGHT work)

Stefan Lehmann’s picture

Not completely sure what you mean. You can always specify a custom URL path. In the URL patterns of the Path auto module you only specify the default behavior when you choose to generate the URL alias automatically, by leaving "Generate automatic URL alias" checked. If you uncheck that box you're free to specify whatever URL alias you want.

I like cookies!