Say I have a content type called "X", and every node of Content type "X" has a form that will create content type "Y"

How do I go about setting up the URL alias of content type "Y" so it will be something along the lines of "www.drupal.com/(Node title of X)/(Node title of Y).com

Thanks for any help!


try the Pathauto module:

The Pathauto module automatically generates URL/path aliases for various kinds of content (nodes, taxonomy terms, users) without requiring the user to manually specify the path alias. This allows you to have URL aliases like /category/my-node-title instead of /node/123. The aliases are based upon a "pattern" system that uses tokens which the administrator can change.

Once set up, you can have it assign the path based on the title of the current node (X) and the field value you assign to the title of node (Y). If you are using nodetitle or something to automatically assign the title for node (Y), you will have to run some custom code when content type (Y) is created in order to assign its alias.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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