07-25-2011, 04:02 AM
[eluser]Wyndsang[/eluser]
Hello!
I started using CI a couple of days ago, and it has been a really effective tool so far.
Yet, there is one teensy problem I'm facing.
I have a very simple page, and a very simple controller called Page.
Page has a function, get_page_by_reference($reference), which fetches mysql data based on a supplied variable, and then constructs a webpage by that data.
Page is set as default controller.
Now, normally, I assume I would supply $reference like this:
However, I would like to be able to just supply:
Is this possible with $route['']?
Also, it would be great if this was only true when there is only one segment following index.php.
Hello!
I started using CI a couple of days ago, and it has been a really effective tool so far.
Yet, there is one teensy problem I'm facing.
I have a very simple page, and a very simple controller called Page.
Page has a function, get_page_by_reference($reference), which fetches mysql data based on a supplied variable, and then constructs a webpage by that data.
Page is set as default controller.
Now, normally, I assume I would supply $reference like this:
Code:
example.com/index.php/page/fetch_page_by_reference/reference
Code:
example.com/index.php/reference
or
example.com/reference
Is this possible with $route['']?
Also, it would be great if this was only true when there is only one segment following index.php.