Welcome Guest, Not a member yet? Register   Sign In
Loading Assets from inside of theme folder
#11

[eluser]Aken[/eluser]
Pyro's folder structure is different from CI's default, but everything is still under the web root. You're trying to put files that need to be accessed via HTTP outside of your web root, making them inaccessible to HTTP requests.
#12

[eluser]xtremer360[/eluser]
I'm sorry. I understand now. I just heard that for safety reasons to take both system and application folders out of the web root. Is there still a way I can deal with this situation still with keeping my file structure?
#13

[eluser]Aken[/eluser]
It is a good idea to put system/application folders outside of the web root, yes. But 1) you shouldn't put static assets in your application folder to begin with, no matter where it is, and 2) you can't access static assets or anything requested over HTTP outside of your web root. So like I said, your themes -- or at minimum, their static assets -- need to be in your web root somewhere.
#14

[eluser]xtremer360[/eluser]
I am still struggling with this situation. I can not get the line of code to run so its not echoing the code out at all. This is my login form view file.

When the page is rendered it completely by passes this line and doesn't echo it and doesn't give me an error for me to know why. Any ideas?

I have since changed my file structure so that it looks like this:

Code:
application/
    themes/
        supr/
            assets/
                js
                css
                images

<?php echo Asset::css('bootstrap/bootstrap.min.css'); ?>
#15

[eluser]InsiteFX[/eluser]
As Aken stated your assets should be in your web root see below directory structure.
Code:
application
system
index.php
assets
-- css
-- images
-- img
-- js
-- icons
-- media

Here is a sample CodeIgniter Application that I am writing to do Bootstrap themes.
It has jQuery and cookie theme handling built-in.

Bootstrap themes

NOTE: This is a work in progress and is in a development stage, not all themes have been added yet but should help you see the structure.
#16

[eluser]xtremer360[/eluser]
I moved the application folder into the web root and can't get that line to show. So I don't know why the line isn't getting rendered.


default.php
Code:
<?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
#17

[eluser]InsiteFX[/eluser]
Code:
public_html/
application/
system/
index.php

assets/
-- css/
-- images/
-- img/
-- js/
-- themes\
#18

[eluser]xtremer360[/eluser]
Then how can PyroCMS get away with no doing it that way.

#19

[eluser]InsiteFX[/eluser]
Because PyroCMS was not written for these versions of CodeIgniter. The older versions before 2.0
did not have the .htaccess file in the directories to protect them.




Theme © iAndrew 2016 - Forum software by © MyBB