Site Design problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Site Design problem (/showthread.php?tid=16444) |
Site Design problem - El Forum - 03-06-2009 [eluser]veamon[/eluser] I'm transitioning an existing site into Code Igniter, and I've hit a snag. In my original, I have my site laid out as such (for example): <root of site> <css> <images> index.html </root and in my index.html, would be something like <img src="./images/myimage.jpg"> How do I do this in code igniter? I have a view controller setup, with an images subdirectory in the views folder, and try and add it the same way but it doesnt show. Site Design problem - El Forum - 03-06-2009 [eluser]pistolPete[/eluser] Leave the css and image files in the web root. Then link them using absolute paths: Code: <img src="/images/some_pic.png" /> Site Design problem - El Forum - 03-06-2009 [eluser]veamon[/eluser] ah. so if i'm using a wysiwyg, I'm going to have to have 2 copies, one in the application folder to design, and then one in the root to actaully see them? Site Design problem - El Forum - 03-06-2009 [eluser]pistolPete[/eluser] [quote author="veamon" date="1236397436"]so if i’m using a wysiwyg[/quote] What are you doing? Are you using an editor like TinyMCE to edit the contents? Why should you need two copies? Site Design problem - El Forum - 03-06-2009 [eluser]veamon[/eluser] Well, I'm using dreamweaver, and with the views being buried in application/system/whatever/whatever, and the main index.php being at the web root....thats why. I'm not going to have ....../images in my controller while I'm designing. *EDIT* Nevermind. I found I can just have my view in the root dir, and have my controller access it by /controllername. Site Design problem - El Forum - 03-07-2009 [eluser]veamon[/eluser] Never mind, this doesnt work. Anyone have any ideas? Am I going to have to echo full paths in my views folder to my images one that is in the root directory? I tried moving a view outside and putting it in the root, and then having my controller load base_url().view, but I get a "page cannot be loaded". Site Design problem - El Forum - 03-07-2009 [eluser]pistolPete[/eluser] Does this work for you? directory structure Code: webroot some_controller.php Code: <?php some_view.php Code: <html> |