http://book.cakephp.org/view/835/image

Ad the 'url' option to the options array for your image.

echo $html->image('icons/new.png', array(
'alt'=>'New Product Icon',
'width'=>$logo_size[0],
'height'=>$logo_size[1],
'border'=>'0',
'class'=>'ProductLogo',
'url' => array('?'=>$queryString_newproducts)
));


On Jun 15, 8:39 am, DSG <darren.creative...@gmail.com> wrote:
> Hi all
>
> I am a complete newbie on this. I have inherited some code and it now
> needs altering. At present the code generates a product list and some
> of the items in the list are new products. At the top of the list is
> an icon and text that becomes the link that allows you to view just
> the new products. I now need to remove this text, which is easy
> enough, but make the icon become the link.
>
> Here is the code if anyone can help:
>
> [code]
> <?php
>
> $logo_size = array(18, 17);
> $logo_image = "";
>
> echo $html->image('icons/new.png', array(
> 'alt'=>'New Product Icon',
> 'width'=>$logo_size[0],
> 'height'=>$logo_size[1],
> 'border'=>'0',
> 'class'=>'ProductLogo'));
>
> $queryString_newproducts = str_replace("data[Product][check_1]=&",
> "data[Product][check_1]=1&", $queryString);
> echo $paginator->sort(' New Product', 'product',
> array('url'=>array('?'=>$queryString_newproducts)));
>
> ?>
>
> [/code]
>
> Any help would be appreciated.
>
> Thanks

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to