Welcome Guest, Not a member yet? Register   Sign In
anyone tried using hyphens instead of "/" ?
#1

[eluser]outtolunch[/eluser]
I'm trying to use only hyphens in the URL's instead of "/", but i get messed up trying to get something out of that url segment, which would look like that: domain.com/car-in-something-somewhere
#2

[eluser]JoostV[/eluser]
Check out the routing section in the superb user GuideWink
#3

[eluser]outtolunch[/eluser]
Well, i'm using this in some cases, but what i want to have is, when you've got a URL like this domain.com/car-in-something-somewhere, I could get "something" while calling $this->uri->segment(3);
#4

[eluser]erik.brannstrom[/eluser]
I haven't done this myself, but I believe you could extend the URI library and override the function _explode_segments(). This of course will mean that you no longer have any use for helper functions such as site_url() and the likes. Or simply use the code in URI to create your own helper functions, since all the necessary code to accomplish this can be found in that class.
#5

[eluser]pickupman[/eluser]
[quote author="outtolunch" date="1271011880"]Well, i'm using this in some cases, but what i want to have is, when you've got a URL like this domain.com/car-in-something-somewhere, I could get "something" while calling $this->uri->segment(3);[/quote]

You will need to take a look at the uri class in the user guide. Take a look at the function using the "r" ie. $this->uri->rsegment(n) function. That should get you closer to what you are looking to do.




Theme © iAndrew 2016 - Forum software by © MyBB