Monday, January 31, 2011

Re: $html->image no show

On Mon, Jan 31, 2011 at 8:23 PM, ugarch <ugarch74@gmail.com> wrote:
> Thank you very much for your response ... I liked the element idea but
> my problem is that sometimes in the banner div i need to place images
> and sometimes videos or a picture slider.

You could set a variable, eg. $banner_type, in the controller and
check that in the element.

> That is why I decided to set the $banner from the controller the way I
> did. But my problem is more related to paths and links because when I
> set $banner = $html->image('Foo.jpg'
> array('class'=>'banner','title'=>"Foo")); from the
> pages_controller.php it works fine. However when I set the $banner
> from the informations_controller.php the image does not shows up. I
> can see in the html source code the image but the path needs to be
> changed from 'img/Foo.jpg' to '../img/Foo.jpg' ... Do you have an
> idea, why do i need to change the image path to ../ so I can see the
> picture?

No, sorry. I know others have run into these problems before but I
never have and am unsure what the cause is.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate