• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
url_title

#1
[eluser]gafro[/eluser]
Hey Guys,

Can someone explain briefly the usage of url_title. how do i go about changing a url?

I know u pass in a string to the url_title function and it does all sorts of nice magical things.

But how do I set the physical URL?

Cheers
Gafro

#2
[eluser]Johan André[/eluser]
What do you mean exactly?

The url_title() converts a string to an url-friendly format:

"My nice article" becomes "my-nice-article".

The "physical" url is set by an anchor, sometimes like this:

Code:
<a href="&lt;?=site_url('controller/method');?&gt;">A link</a>

You can do a redirect in a controller too:

Code:
&lt;?php
    redirect('controller/method', 'location');
?&gt;

#3
[eluser]gafro[/eluser]
... i wrote a post clarify what I was wanting.

But I've figured it out while trying to clarify. lol

Thanks for replyingBig Grin

btw: nice macsBig Grin

#4
[eluser]Johan André[/eluser]
[quote author="gafro" date="1237760752"]
btw: nice macsBig Grin[/quote]

Hehe! They sure are! Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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