• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
URL to load page and move to named item

#1
[eluser]bazianm[/eluser]
Hi,

I am converting a website from static html to codeigniter. They have some links that refer to bookmarks within the page e.g.
Code:
http://www.mysite.com/mypage.html#mybookmark
. How can I do this with codeigniter?

#2
[eluser]TWP Marketing[/eluser]
[quote author="bazianm" date="1342638854"]Hi,

I am converting a website from static html to codeigniter. They have some links that refer to bookmarks within the page e.g.
Code:
http://www.mysite.com/mypage.html#mybookmark
. How can I do this with codeigniter?[/quote]

The URL format using CI would be something like this:

Code:
htt p://www.mysite.com/index.php/controller/function#mybookmark

If you are coding this as a link within a page, use current_url(), for example:

Code:
<? php echo current_url().'#mybookmark';?>
EDIT, not the spaces added to avoid this forums anti-spam protection


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.