I would like to know how I can include additional URL parameters to a given link? ie: 'news?pid=3'
<?php print $path='news?pid=3'; ?>
This returns page not found error as the '?' is getting printed as %3F.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
If you are using
l(), you would do something like this to create news?pid=3.
l('Link Text', 'news', array('query' => array('pid' => '3')));
If you have other query parameters, you can add them in like this:
l('Link Text', 'news', array('query' => array('pid' => '3', 'foo' => 'bar')));
and that would create