base_url() for everything? |
[eluser]universal_serial_bus[/eluser]
Hi there, I'm developing with CI and I've the next problem: I'm migrating some views from an old project to CI, and this views have relative routes to css, js and img. So, if I keep this routes (relative to index file in CI root directory) it only works on index entry of every controller... I mean, if I do something like www.example.com/example, the index function of the example controller loads the view and it works fine, but if I do www.example.com/example/view/1, the same view is loaded, but now relative routes are not found (css, js, img,...). I've fixed it using base_url() with every link, but, it's necessary to do this with every route? I hope I've been clear... Thanks in advance ! EDIT: Anyway, with the way I've solved it I still have problems with the images linked in the js files... any solution..? |
Messages In This Thread |
base_url() for everything? - by El Forum - 09-06-2010, 08:54 AM
base_url() for everything? - by El Forum - 09-06-2010, 10:31 AM
base_url() for everything? - by El Forum - 09-06-2010, 10:40 AM
base_url() for everything? - by El Forum - 09-06-2010, 11:00 AM
base_url() for everything? - by El Forum - 09-06-2010, 05:36 PM
|