On a previous project, I could not get my CSS and JS files to load. Thankfully, folks offered great suggestions here which fixed the problem.
The way that I fixed the problem was to place all of my include files at the same level as the “system” folder. It worked great, but then I went to another project. I made a new copy of the old project and started modifying files…so the file structure looks like this:
| .htaccess
| .project
| index.php
| license.txt
| newProject
|
+—-public
| | index.html
| |
| +—-admin
| | | index.html
| | |
| | +—-css
| | | admin_console.css
| | | index.html
| | |
| | +—-images
| | | background.jpg
| | | cross.png
| | | index.html
| | | login_toggle.jpg
| | | nav_bg.jpg
| | | nav_separator.jpg
| | | pencil.png
| | | Thumbs.db
| | | transparent.gif
| | | zoom.png
| | |
| | \—-js
| | index.html
| |
| +—-frontend
| | +—-css
| | | fal_style.css
| | |
| | +—-images
| | | browse_crag_bg.jpg
| | | bullet.gif
| | | footer_bg.jpg
| | | header.jpg
| | | Thumbs.db
| | | tick.png
| | |
| | \—-js
| | index.html
| |
| +—-images
| | | index.html
| | |
| | \—-captcha
| | base_image.jpg
| | index.html
| |
| \—-shared
| | index.html
| |
| +—-css
| | index.html
| |
| +—-images
| | arrow.gif
| | error.png
| | index.html
| |
| \—-js
| flash.js
| index.html
| jquery.js
|
+—-rad (system)
| +—-application
| | | index.html
| | |
| | +—-config
| | |
| | +—-controllers
| | | | index.html
| | | | welcome.php
| | | |
| | | +—-home
| | | | home.php
| | | |
| | | \—-siteignite
| | | designmenu.php
| | |
| | +—-errors
| | |
| | +—-helpers
| | | index.html
| | |
| | +—-hooks
| | | index.html
| | |
| | +—-language
| | |
| | +—-libraries
| | | asset_linker.php
| | | index.html
| | |
| | +—-models
| | | | index.html
| | | |
| | | +—-common
| | | | menu.php
| | | |
| | | \—-siteignite
| | | treejson.php
| | |
| | \—-views
| | | index.html
| | | welcome_message.php
| | |
| | +—-common
| | | body.php
| | | col2.php
| | | col3.php
| | | footer.php
| | | header.php
| | | header_admin.php
| | | header_site.php
| | | menu.php
| | |
| | +—-home
| | | body.php
| | | container.php
| | |
| | \—-siteignite
| | body.php
| | container.php
| |
| +—-cache
| | index.html
| |
| +—-codeigniter
|
+—-_css
| 3col.css
| prettify.css
| style.css
| superfish.css
| tree_component.css
|
+—-_images
| \—-tree
| dot.gif
| fminus.gif
| fminus_rtl.gif
| fplus.gif
| fplus_rtl.gif
| lastli.gif
| lastli_rtl.gif
| li.gif
| marker.gif
| marker_rtl.gif
| plus.gif
| remove.png
| throbber.gif
|
\—-_js
bubble.js
css.js
hoverIntent.js
jquery-1.2.6.min.js
jquery.bgiframe.min.js
jquery.form.js
jquery.listen.js
superfish.js
supersubs.js
tree_component.js
_all.js
Please note the following:
* I have copied the “asset_linker” files into this project, but it is not being used yet as I do not completely understand it.
* In the first project, there was no .htaccess file. The contents of this project’s .htacess file are:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]I have tried deleting the .htacess file and I still cannot get my CSS and JS files to load, so I am unsure if it is the problem.
* The CSS and JS files are being called from the directories “_css” and “_js” respectively.
What I am doing is implementing the “partial” view method. You can see the current controller result here. If you view the HTML source, you see that the js and css files’ full paths are present…
<!-- COMPONENTS -->
[removed][removed]
[removed][removed]
[removed][removed]
<link rel="stylesheet" type="text/css" href="http://radsrc.fastcheapweb.com/_css/tree_component.css" />
<link rel="stylesheet" type="text/css" href="../../_css/style.css" />...and you can see from the “tree” listing above that the files are present in their “system” peer level directories.
But you can obviously see that it is not working. :red:
What am I doing wrong? As always, I do appreciate the help.