The typical way to pass a query string to a link path, in the l() function, is to supply a 'query' array. However, there is no way to do so via theme_simple_dialog_link().
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | simple_dialog-1791940-1.patch | 902 bytes | paulmckibben |
Comments
Comment #1
paulmckibbenPlease see attached patch that allows you to pass an additional ['link_options'] array in $args. Thanks!
Example: (results in some/drupal/path?myquery=value)
Comment #2
drclaw commentedHey, nice idea. Thanks for that patch! I had to modify it just a little bit though. The array merge was overwriting the required attributes (the ones assigned in the $link_options variable) if attributes were passed in the 'link_options' argument for the theme function. Instead, I merged the attributes first, then merged the link_options. Also, I added the link_options to the default variables in hook_theme. Additionally I found a bug where I was still keying the default variables in hook_theme as 'arguments'. I fixed that so now if you call theme('simple_dialog_link'...) and don't supply, for example, any classes, it won't give you an array index error. Lastly, I added a quick bit of documentation for the new theme function variable.
Anyway, Thanks again for the patch! I pushed a new release (7.x-1.7).