Asset Library |
[eluser]xtremer360[/eluser]
In trying to find out how to have the following work. I'm using the template and asset libraries from PyroCMS to help in aiding my CI application and I’m trying to figure out how I can have the dashboard look for the images/css/js files in the file structure below as opposed to the regular assets folder in the public_html folder since those files only pertain to that theme. As far as I know the code below is what is used to render a specific css file. The theme is running smoothly but when the line below gets called it renders nothing as if there is no code line present. I'm still trying to find out why the line isn't getting rendered. I'm still needing an idea for this. <?php echo Asset::css(‘bootstrap/bootstrap.min.css’); ?> public_html/ application/ themes/ supr/ assets/ js/ images/ css/ bootstrap/bootstrap.min.css views/ layouts/ default.php
[eluser]xtremer360[/eluser]
Still needing help with this issue. I'm going to rephrase because I've gotten further on this. I have added the path in my backend controller and set it and now when I open the browser for it to go find the file it says that I don't have the write permissions to view the file. >You don't have permission to access /application/themes/supr/assets/css/bootstrap/bootstrap.css on this server.</p> <p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p> <hr> <address>Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at dev.mysite Port 80</address>
[eluser]Aken[/eluser]
Make sure you don't have an .htaccess rule blocking it somewhere.
[eluser]xtremer360[/eluser]
I don't have it blocking anything. This is my htaccess. When I look inside the firebug console and expand the css file it says 404 file not found. <link href="http://dev.myurl/application/themes/supr/assets/css/bootstrap/bootstrap.css" rel="stylesheet"> However on my server I can navigate and locate the file in question. Code: RewriteEngine On
[eluser]Aken[/eluser]
Is there an .htaccess file in your application folder, or any folder in between root and the assets file?
[eluser]CroNiX[/eluser]
Did you alter the default .htaccess that comes in /application? Having anything public in /application is not a good idea for security, which is why CI denies url access to that directory by default.
[eluser]xtremer360[/eluser]
So your saying I should do something like ../assets/themes/mytheme/supr/css,images,js?
[eluser]CroNiX[/eluser]
Yes. It should be at the same level your index.php is located. Not within /application or /system or any of their subfolders. That's why the htaccess in those directories say "deny from all"...no URL access. Everything in there should ONLY be called via CI (index.php - like your controllers/etc). Code: /public_html The url would be something like http://yoursite.com/assets/css/bootstrap/bootstrap.css
[eluser]Aken[/eluser]
We told you this a long time ago. Don't mix static assets and application logic. That's why Pyro uses the addons folder.
[eluser]xtremer360[/eluser]
Continuing on. 0 down vote favorite I have a development server at dev.mysite.com and I am working with coda and git to make commits and pushes to the repo which has a developmenet branch that points to my dev domain. The file structure as of right now is this. As of right now does anyone see anything that I should reconsider changing. I'm asking this because of having a public_html inside the dev folder or what. With this setup currently when I load dev.mysite.com it shows the index of / which shows .gitignore, .git, and public_html. [code] ../ /dev /mysite.com .git .gitignore /application /public_html /assets /css /images /js themes /supr /css /js /images index.php /system /mysecondsite.com /application /public_html /assets /index.php /system /sites /mysecondsite.com /application /system index.php |
Welcome Guest, Not a member yet? Register Sign In |