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-arguments http://drupal.stackexchange.com/questions/33125/why-can-i-redirect-the-user-...
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@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-arguments
http://drupal.stackexchange.com/questions/33125/why-can-i-redirect-the-user-...
[ Drupal support list | http://lists.drupal.org/ ]
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@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Gerald Klein Sent: Wednesday, June 06, 2012 3:14 PM To: support@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@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/ ]