Skip to main content
improved formatting, and spelling
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

I'm working on my first module. I'm setting up my hook_menu()hook_menu() to register several urlsURLs. Some of the parameters may be raw strings with slashes in them. For example, "Round 1 / Heat 1" as one parameter. Now, I know that I can make my javascript encode the slashes when constructing the URL, but it makes me wonder if I'm Doing It Wrong (tm)Wrong™.

It feel natural to me to be able to use GET params, but I don't see any way to access those in my hook_menu functionmenu callbacks.

  1. Am I Doing It Wrong with these url based params?

  2. Is it possible to just POST these params and access them in my hook_menu() callbacks?

Any suggestions are welcome.Am I doing It wrong with these URL-based parameters?
Is it possible to just POST these parameters, and access them in menu callbacks?

I'm working on my first module. I'm setting up my hook_menu() to register several urls. Some of the parameters may be raw strings with slashes in them. For example, "Round 1 / Heat 1" as one parameter. Now, I know that I can make my javascript encode the slashes when constructing the URL, but it makes me wonder if I'm Doing It Wrong (tm).

It feel natural to me to be able to use GET params, but I don't see any way to access those in my hook_menu function callbacks.

  1. Am I Doing It Wrong with these url based params?

  2. Is it possible to just POST these params and access them in my hook_menu() callbacks?

Any suggestions are welcome.

I'm working on my first module. I'm setting up hook_menu() to register several URLs. Some of the parameters may be raw strings with slashes in them. For example, "Round 1 / Heat 1" as one parameter. Now, I know that I can make my javascript encode the slashes when constructing the URL, but it makes me wonder if I'm Doing It Wrong™.

It feel natural to me to be able to use GET params, but I don't see any way to access those in menu callbacks.

Am I doing It wrong with these URL-based parameters?
Is it possible to just POST these parameters, and access them in menu callbacks?

Source Link
Kenny Wyland
  • 3.1k
  • 5
  • 40
  • 72

Using slashes in drupal path parameters

I'm working on my first module. I'm setting up my hook_menu() to register several urls. Some of the parameters may be raw strings with slashes in them. For example, "Round 1 / Heat 1" as one parameter. Now, I know that I can make my javascript encode the slashes when constructing the URL, but it makes me wonder if I'm Doing It Wrong (tm).

It feel natural to me to be able to use GET params, but I don't see any way to access those in my hook_menu function callbacks.

  1. Am I Doing It Wrong with these url based params?

  2. Is it possible to just POST these params and access them in my hook_menu() callbacks?

Any suggestions are welcome.