Welcome Guest, Not a member yet? Register   Sign In
Relative internal URLs
#1

[eluser]Unknown[/eluser]
Hi everyone,

I have just started checking out CodeIgniter. Since I have been using CakePHP for the past 2 years I have not been able to discover how to create relative URLs (something I am used to). FYI: I have tried searching in the wiki and these forums without much luck.

What I want to do
I want to create an URL for the action/function/method called "dosomething" (as an example) in the current controller from a view-file that may be used in more than one controller.

What I have tried doing so far
I get the same results regardless of a preceding slash. The URL helper seems to only handle "complete" urls that can be prepended by config-values for the installation.
'dosomething'
'/dosomething'

I think that I may be able to get something going by using segment(0) the uri class to get the controller name but from what I have read that will fail as soon as I start putting thing in a folder or change some routing.

What I am looking for is the preferred or official or supported way of determining the current controller and action names from within a view.

Thanks in advance for any hints and tips on this subject.


Messages In This Thread
Relative internal URLs - by El Forum - 10-17-2007, 06:46 AM
Relative internal URLs - by El Forum - 10-17-2007, 07:52 AM
Relative internal URLs - by El Forum - 10-17-2007, 08:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB