Monday, April 5, 2010

Re: Change img folder?

You are right. I just tried it.
Works in bootstrap like you said.
Would've been nice if a local paths.php would override the global one,
but .. :)
Maybe I'll file a feature request. Maybe not.
Thanks for the clarification.

On Apr 5, 10:35 pm, John Andersen <j.andersen...@gmail.com> wrote:
> Hi Jacmoe,
>
> Yes, you should work with what CakePHP gives you, but a copy of the
> paths.php file will not be used by your application, so it will not
> help in this case.
>
> But CakePHP provides you with the bootstrap.php file, so that you
> there can override some parts of the standard functions or constants,
> etc.
>
> I recommend Dave to just redefine the IMAGE_URL constant, as that is
> the one being used by the Html helper.
> Enjoy,
>    John
>
> On Apr 5, 8:59 pm, jacmoe <jac...@mail.dk> wrote:
>
> > I would think that copying and modifying the paths.php would be more
> > Cake-kosher.
> > That's generally what you do in Cake, isn't it?
> > Copy AppModel.php and override the built in Cake AppModel, copy
> > AppHelper and override that, and so on.
>
> > On Apr 5, 7:34 pm, John Andersen <j.andersen...@gmail.com> wrote:
>
> > > If you want the change to be permanent, then redefine the constant
> > > IMAGE_URL to 'images/', that should do it!
> > > Enjoy,
> > >    John
>
> > > On Apr 4, 10:53 pm, jacmoe <jac...@mail.dk> wrote:
>
> > > > I believe you can just copy cake/config/paths.php to app/config/
> > > > paths.php and edit it:
> > > >         define('IMAGES', WWW_ROOT.'images'.DS);
>
> > > > On Apr 4, 9:12 pm, "Dave" <make.cake.b...@gmail.com> wrote:
>
> > > > > Is it possible to change the folder where cake looks for images when using
> > > > > $html->image?
>
> > > > > I find that Photoshop loves to save everything into "images" so i have to
> > > > > take everything out of "images" and place it into "img" constantly. Would be
> > > > > easier if i could change cakes default "img" to "images"
>
> > > > > Can this be done easily?
>
> > > > > Dave
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

To unsubscribe, reply using "remove me" as the subject.

No comments: