Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By Anonymous (not verified) on
Hi,
i enabled clean URL's
i want to put a #top anchor at the end of every comment. i can't do it because of the
<base href="<?php echo "$base_url/" ?>" />
setting. if i give a link like this:
<a href="#top">top</a>
the link becomes "$base_url/#top" but it should be something like "$base_url/node/view/1234/#top" And likes of $PHP_SELF give out $base_url/index.php#top
i'm aware this is not a drupal problem, but dared to ask anyway..
thanks..
Comments
Ooooh, interesting one...
I hadn't thought about that before. Hmmmm... how about going:
print "<a href=\"$_SERVER[REQUEST_URI]#top\">top</a>";
why, thank you..
yes that worked..
actually instead of $_SERVER[REQUEST_URI] i had to use, global $REQUEST_URI; and then echo $REQUEST_URI; but t worked.. thank you very much..