well i didn't think of using plain old html and i have tested that
approach and it DOES work.

BUT.....if I am using a thumbnail image to link to another image, I
have to make sure to update the paths in my view if i ever change my
webroot. seeing as how this is on a dev box in a subdirectory, it
would be ideal if we could user CakePHP's helper to render well-
formatted html.

cake will create the proper html if i am not behind /admin

maybe you mean i should edit routes.php and create a rule for img
thumbnails in this view.

On Mar 24, 2:32 pm, brian <[email protected]> wrote:
> On Tue, Mar 24, 2009 at 1:42 PM, JamesF <[email protected]> wrote:
>
> > Hello all,
>
> > I have an admin view set up at /view
>
> > so in the browser it looks like (when logged in as admin):
>
> > mysite.com/admin/view
>
> > on this page is a thumbnail of one image with a link to another
> > image.
>
> > echo $html->link($html->image($thumbnail_url , array('alt' =>
> > 'Thumbnail')), '../img/'.$fullsize_url, array('target' => '_blank'),
> > null, false );
>
> > that outputs the image ($thumbnail_url) just fine
>
> > mysite.com/img/thumbnail_name.jpg
>
> > BUT the link is formatted as such:
>
> > mysite.com/admin/img/image_name.jpg
>
> > I have tried adding 'admin'=>'false' to the helper like so:
>
> > echo $html->link($html->image($thumbnail_url , array('alt' =>
> > 'Thumbnail', 'admin'=>'false')), '../img/'.$fullsize_url, array
> > ('target' => '_blank'), null, false );
>
> > or
>
> > echo $html->link($html->image($thumbnail_url , array('alt' =>
> > 'Thumbnail')), '../img/'.$fullsize_url, array('target' => '_blank',
> > 'admin'=>'false'), null, false );
>
> > I assume the I am adding the  'admin'=>'false' to the wrong part of
> > the helper string. anyone have an idea?
>
> Yeah, that should go in the URL array. Unfortunately, you're not using
> an array as it's an image. But, since you probably don't care about
> routes in this instance, why not just write the link in old-school
> HTML (ie. without the helper)?
>
> Or, do you need Route for the thumbnail link?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to