Welcome Guest, Not a member yet? Register   Sign In
Anyway to set $config['url_suffix'] during runtime?
#1

[eluser]gunnarflax[/eluser]
Hi everybody!

I'm looking for a way to set the url suffix during runtime. In my CMS the user gets the option to use "Pretty URLs" and the setting is stored in a database.

I can't use hooks since they can't be defined when the controller is reached in the execution order. If I set:
Code:
$this->config->set_item('url_suffix', 'html');

It doesn't show up in the URL since the controller has already been executed. Any suggestions? Will it be enough to change the value in the URI-class object or must I change the value in a whole bunch of instances?
#2

[eluser]toopay[/eluser]
Your option is limited and its not a easy job. If you want to use hook, you need to "edit"/access the config file at pre-system checkpoint. Its on route section flow, suffix inspection happened. Or if access/edit file its not flexible enough for you, you can hack the URI-class to receive some defined constant from your pre-system hook.
#3

[eluser]gunnarflax[/eluser]
mm, it seems like I have to skip that part of my application, it would have been nice though Smile




Theme © iAndrew 2016 - Forum software by © MyBB