1

I'm not sure if this is possible in drupal 7, but I think I may have seen something like this happen before. Let's say i added a content and you can see it at the url http://mysite.com/my-article. In the content area, I'm displaying a block that's made by a custom module. Right now, I have no problems going to a url like http://mysite.com/my-article?var1=hello, and then having my module responsible for creating the block to print $_GET['var1'].

However, the only change I would like to make is to have friendly urls. I would prefer the url to be http://mysite.com/my-article/hello, then I would output the same content in my module block. Is this easily do-able?

1 Answer 1

2

All is right what you are doing.

You cannot pass additional parts randomly with URL without adding them to menu registry and associating with callback.

Drupal uses $_GET['q'] for default URL path and makes it SEO friendly. $_GET['q'] can contain 9 parts in total in Drupal 7 (7 parts in Drupal 6). Each part can be accessed via arg(n) function.

2

Your Answer

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

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