Wednesday, July 29, 2009

Re: Vendors handling with js/css script packages without breaking their file structure

you don't need to use vendors unless you are including php files.

put the js in your /public_html/js
the the css in your /public_html/css

in your layout:
if your css was located in /public_html/css/mycss/mycss-file.css
you would use
<?php echo $html->css('mycss/mycss-file'); //no extension ?>

if you wanted to include jquery and it was in
/public_html/js/jquery/jquery-1.3.2.min.js

<?php echo $javascript->link('jquery/jquery-1.3.2.min.js', false); //
no extension ?>


the way i showed you assumes js in the public_html/js folder and css
in the public_html/css folder

but you can point to any subdirectory in your webroot by using /path/
filename/ or even ../../path/filename or whatever path works for you.

On Jul 29, 4:45 pm, Christian <christian.lusz...@gmail.com> wrote:
> Addon: I am using mod_rewrite ...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: