Is it possible to use Assets to include files that are in sub folders?
Example: [base_url] /assets/css/pepper-grinder/jquery-ui-1.8.11.custom.min.css
Is it possible to use Assets to include files that are in sub folders?
Example: [base_url] /assets/css/pepper-grinder/jquery-ui-1.8.11.custom.min.css
You can access subfolders of the asset/ folder with this:
// Image in /assets/img1.jpg
print Asset::img("img1.png");
// Image in /assets/subfolder/img2.jpg
print Asset::img("subfolder/img2.jpg");
In ./fuel/core/config/asset.php
, you can alter the following code:
/**
* An array of paths that will be searched for assets. Each asset is a
* RELATIVE path from the base_url WITH a trailing slash:
*
* array( assets/ )
*/
paths => array( ),
And
/**
* Asset Sub-folders
*
* Names for the img, js and css folders (inside the asset path).
*
* Examples:
*
* img/
* js/
* css/
*
* This MUST include the trailing slash ( / )
*/
img_dir => img/ ,
js_dir => js/ ,
css_dir => css/
If you configure paths
to be assets
and css_dir
to be css/
, you can include [base_url] /assets/css/pepper-grinder/jquery-ui-1.8.11.custom.min.css
by using echo Asset::css( pepper-grinder/jquery-ui-1.8.11.custom.min.css );
Yup, you just set the paths in asset.php to whatever you like:
$config[ asset_paths ] = array( assets/ );
That is if you want to use the Asset library. Otherwise just make them absolute paths from webroot.
I have a query that is returning a single result and I m wondering if there s a way to access the properties of that result without having to loop through it since I am limiting it to a single result. ...
I was trying to get the FuelPHP ORM Observers to use MySQL datetimes rather than unix timestamps, however I can t figure out how to use the code provided in the docs. They provide this code: Orm...
I m trying to undestand how FuelPHP was written.. And since I don t know OOP much, I m puzzled when this class: https://github.com/fuel/core/blob/master/classes/date.php Here are methods that I don t ...
I been testing is_mobile(): if (Agent::is_mobile()) { $content = View::factory( mobileviewname ); } else { $content = View::factory( standardviewname ); } PHP profiler reports it taking up ...
Is it possible to use Assets to include files that are in sub folders? Example: [base_url] /assets/css/pepper-grinder/jquery-ui-1.8.11.custom.min.css
I ve always came away from stackoverflow answers and any reading I ve done that "===" is superior to "==" because uses a more strict comparison, and you do not waste resources converting value types ...
Just testing out Fuelphp.. was wondering if anyone is aware of the issue with Asset:: call I implemented it in a template and got an error ( error view : url ) thanks ps: I guess i need to set Asset:...
Brief forward: I tried to ask this on the FUEL forums, but every time I try and register, their forum says "Failed sending activation email" and I can t log in or reset my account. So hopefully folks ...