Thanks, it won't work with my site because if I did the way you
mentioned, i could not store the whole content of a page in a single
database field, without parsing it every time, looking for images and
links.
The solution to replace the code in the database is also a bit
problematic, because you have to do it then each time when you move
your app to an other server.
Any other ideas?
On 23 Mrz., 16:15, "djiize" <[EMAIL PROTECTED]> wrote:
> Use the Html helper to include elements in your page, it deals with
> the place of Cake files in the webroot
>
> instead
> <img src="chocolate_cake/img/picture.jpg" />
> do
> $html->image('picture.jpg');
>
> The helper will automatically look into img/ folder. And if your site
> is in a webroot's subfolder, it will see it too, and produce correct
> HTML code.
> Move your app, and it will still work
>
> Same thing for CSS, JS, ...
>
> On 23 mar, 15:47, "korcs" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I have a little problem with my webroot.
>
> > I have my whole cake dir structure in a dir called 'cholocate_cake'.
>
> > I am using a database, where the html code of the pages stored.
> > This code contains some links and images as well.
>
> > All of these links and images are working with relative adresses (f.e.
> > for images: 'src="img/picture.jpg"', where the picture.jpg is in the
> > './img/' directory).
>
> > Now I found, that when I copy the content of the old img directory
> > into the app/webroot/img directory, then the pictures are not
> > displayed. Only if I change the links to 'src="chocolate_cake/img/
> > picture.jpg"'.
>
> > Do you know which is an elegant solution for this?
>
> > Best,
>
> > korcs
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---