Most of the solutions provide are very ugly and messy as well.
What you really want is to add and remove css/js files as and when you
want and display them when you want too.
To do that you need this:
In the app_controller.php declare a var to hold all the js and scc
files like so:
var $css_fi
I had this same problem and here is how I took care of this.
I created 2 php files. One that had a CSS header so it would act as
CSS and the other, you guessed it, with a JS header.
I used the php include in those files to include any scripts that
would be used across the entire app.
// Below th
I had this same problem and here is how I took care of this.
I created 2 php files. One that had a CSS header so it would act as
CSS and the other, you guessed it, with a JS header.
I used the php include in those files to include any scripts that
would be used across the entire app.
// Below th
> - Having the ability to add view-specific CSS or Javascript
That's what $scripts_for_layout is for.
You use it in conjunction, with the false param for CSS and
Javascript.
So, for example, from your view:
$html->css('my_css_file', 'stylesheet', array("media"=>"all" ),
false);
$javascript->link
Hi Gonzalo thx for the fast response.
the first article is not new to me
i'll take a look @ the second one
maybe i also need an MVC-pattern re-read T_T
On 17 Nov, 16:13, "Gonzalo Servat" <[EMAIL PROTECTED]> wrote:
> On Mon, Nov 17, 2008 at 1:07 PM, Gonzalo Servat <[EMAIL PROTECTED]> wrote:
>
>
On Mon, Nov 17, 2008 at 1:07 PM, Gonzalo Servat <[EMAIL PROTECTED]> wrote:
[..snip..]
>
>
> See the following article:
>
>
> http://bakery.cakephp.org/articles/view/some-ideas-to-organize-your-css-files-and-autoload-them-in-cakephp
>
This might help too:
http://developingwithstyle.com/2007/01/16
On Mon, Nov 17, 2008 at 12:28 PM, i_Am_ToO_SeXy <[EMAIL PROTECTED]> wrote:
>
> Hello.
>
> CakePHP is driving me mad.
>
> I can't figure out a smart way to manage CSS and Javascript inside my
> app.
>
.. and you believe CakePHP is the culprit?
This is my goal:
> - Having one (or many) CSS files c
Hello.
CakePHP is driving me mad.
I can't figure out a smart way to manage CSS and Javascript inside my
app.
This is my goal:
- Having one (or many) CSS files common to all views
- Having one (or many) Javascript files common to all views
- Having the ability to add view-specific CSS or Javascr