[support] drupal_goto and views arguments
Metzler, David
metzlerd at evergreen.edu
Wed Jun 6 22:29:12 UTC 2012
If clean urls are enabled, drupal_goto('exampleview/myarg') should work.
Are you 100% sure that the url is constructed properly and that there
aren't other destination= urls in play or something like that?
I'm assuming that you are generating the url programmatically, so
without knowing your code I'd suggest something like this:
<?php
$url = 'exampleview/myarg');
drupal_set_message($url);
drupal_goto($url);
?>
Array('exampleview','myarg') is incorrect syntax. Thet's what you
would do in $form_state['redirect'], but not in drupal_goto, which has a
different expected parameters.
Dave
________________________________
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Gerald Klein
Sent: Wednesday, June 06, 2012 3:14 PM
To: support at drupal.org
Subject: Re: [support] drupal_goto and views arguments
I guess maybe I don't understand the question. exampleview/myarg should
take you to exampleview and pass myarg in?
On Wed, Jun 6, 2012 at 4:59 PM, Adm <linuxloverstaff at gmail.com> wrote:
I posted this question on stackoverflow and on drupal.stackexchange,
but no one solved my problem. I hope you can help me:
I made a view with views module: "exampleview"
View needs an argument: "myarg"
I can load my page at "exampleview/myarg" and at "exampleview".
When I call
<?php
drupal_goto('exampleview/myarg');
?>
the real destination is only "exampleview".
Same result with:
<?php
$arr = array('exampleview','myarg');
drupal_goto($arr);
?>
Have you any good idea about?
Thanks all!
ADM
PS:
http://stackoverflow.com/questions/10902254/drupal-7-drupal-goto-argumen
ts
http://drupal.stackexchange.com/questions/33125/why-can-i-redirect-the-u
ser-to-my-view
--
[ Drupal support list | http://lists.drupal.org/ ]
--
Gerald Klein DBA
ContactMe at geraldklein.com
www.geraldklein.com <http://geraldklein.com/>
jk at zognet.com <mailto:jk at zognet.com>
708-599-0352
Arch Awesome, Ranger & Vim the coding triple threat.
Linux registered user #548580
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20120606/32ceb5ec/attachment-0001.html
More information about the support
mailing list