1

I am using drupal 7, have a content type and two taxonomy categories, size and shape.

Im trying to build a dynamic url such as mysite.com/node/nid/tid/tid, which would get rewrote as e.g mysite.com/page-1/large/square.

I want the content of the url to just show the node, so in this case node/1. But I am also going to make 2 blocks one for category size and another block for category shape which will get the relevant IDs from the url and show the relevant content, in this case block 1 will show large and block 2 will show square.

I thought I could generate the page in views by setting the URL to node/%/%/% or node/%// and setting arg 1 to nid, but this comes back as page not found.

So I am wondering is this possible in views if not how can I create a url such /arg1/arg2/arg3 which represents /a nid/a category 1 tid/a category 2 tid, and then populate the page dynamically?

Thanks for any help

edit/

So I have got the arguments working. mysite.com/%/%/% by setting the last argument as the target page rather than the first argument. But how can I rewrite the url. So arg1 becomes node title, arg2 becomes term id 1 and arg3 becomes term id 2 title?

0

You'll need to set your pathauto pattern settings to rewrite your URL. Goto Configurations > Search and metadata > URL aliases > Patterns. Set the pattern for your content type to:

[node:title]/[node:field_...]/[node:field_...]

Where the "node:field_..." is replaced with the respective tokens for your taxonomy fields.

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.