Hi Drupalfriends<div><br></div><div>I'd like to add a query string to every url. If the URL is '/node/234' it should change to '/node/234&iframe=on'.</div><div><br></div><div>I found the custom_url_rewrite_outbound function and added it to my settings.php:</div>
<div><br></div><div><div> if (isset($_GET['iframe']) && 'on'==$_GET['iframe']) {</div><div> $path .= (strpos($path, '?') !== FALSE ? '&' : '?') . 'iframe=on';</div>
<div> }</div></div><div><br></div><div>This works fine, but the url() method, which calls custom_url_rewrite_outbound runns $path through drupal_urlencode() afterwards. This means the url changes to '/node/234%3Fiframe%3Don' which obviously does not work.</div>
<div><br></div><div>Am I doing something wrong or is there another way of getting this to work?</div><div><br></div><div>Regards</div><div>Ernst</div><div><br></div>