0

I added a custom node-type (content-type) called Document (for example), i also allowed it to create a menu item for navigation purposes.

Then assigned a non-admin role the permission to create new content/edit own content and delete own content.

But the problem here arises that Drupal is automatically creating the paths to create node page.

In simpler terms, its creating a menu item with the path /node/add/document

but this is something i have to avoid, I instead want something like this /add/document

I can't find any way to do this, a Google search also led to nothing helpful. Is it not possible to customize/modify this behavior? my main problem with the default path structure is the "node" being displayed.

UPDATE

I managed to find a way to make the path work with my choice of path structure by going to the URL aliases section (admin / config /search / path ), and assigning the old path a new alias, but like i guessed its still letting me access the add page with the "node" intact as well.

Thanks in advance

2 Answers 2

1

It's by design... You can able to access path using normal path and aliased path...

However, you can change this behaviour using Global Redirect module which redirects to aliased path if available...

Project page says

Once enabled, an alias provides a nice clean URL for a path on a site. However Drupal does not remove the old path (eg node/1234). The problem is that you now have two URLs representing the same content. This is dangerous territory for duplicate pages which can get you sandboxed by the search engines!

0
1

You can also use pathauto (URL Alias) which allows you to chose a particular path for your custom content add. Enable this module and go to yourdomain/admin/config/search/path where you can add a path for your custom content type.

Add Existing system path like : node/add/document and Path alias as : add/document

1
  • Thanks, this is also good and can work in conjunction with Global Redirect.
    – Zubair1
    Apr 21, 2014 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.