Welcome Guest, Not a member yet? Register   Sign In
correct layout structure
#1

[eluser]Uplift[/eluser]
What is the correct layout structure for views?

i can view my index.php fine, but when i go to something like index.php/blog/ or whatever then all links fail so i get no includes, css, or js.

/application/views/ (home page, etc..)
/application/view/includes/ (header, footer, sidebar, etc...)
/css/
/js/
index.php

afaik everything is relative to index.php

Would i need use full paths for linking everything? I was hoping to avoid this because at the moment i have code igniter in a temp directory before i go live i don't want to edit full site and remove it's directory prior to going live.
#2

[eluser]InsiteFX[/eluser]
Create a assets folder in the root with index.php
Code:
/application/views/ (home page, etc..)
/application/view/includes/ (header, footer, sidebar, etc…)
assets
/css/
/js/
index.php

then when including your files use:
Code:
<link href="<?php echo base_url();?>assets/css/your_file.css" rel="stylesheet" type="text/css" />

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB