I want this code in html
<a href="images/p191-large.jpg" class="cloud-zoom-gallery" rel="useZoom: 'zoom11', smallImage: 'images/p191.jpg' " title="Women's Crepe Printed Black">
<img class="zoom-tiny-image" itemprop="image" src="images/p191.jpg" width="80" height="97" alt=""/>
</a>
I have written this code in cakephp to get above result
<?php
echo $this->Html->link(
$this->Html->image("p191.jpg", array(
"alt" => "Pant Suit",
"width" => "80",
"height" => "97",
'class' => 'zoom-tiny-image'
)),
array(
'controller' => 'admins',
'action' => '$this->Html->image(p191.jpg)'
),
array(
'class' => 'cloud-zoom-gallery',
'title' => 'Women\'s Crepe Printed Black',
'escape' => false,
'rel' => "useZoom: 'zoom11', smallImage: 'images/p191.jpg' "
)
);
?>
but getting this as output
<a href="/stylishtailor1/admins/ ;image(p191.jpg)" class="cloud-zoom-gallery" title="Women's Crepe Printed Black" rel="useZoom: 'zoom11', smallImage: 'images/p191.jpg' ">
<img src="/stylishtailor1/images/p191.jpg" alt="Pant Suit" width="80" height="97" class="zoom-tiny-image" />
</a>
how can I do this, please reply on this???
This is the closest code to your desired one:
<?php
echo $this->Html->link(
$this->Html->image('/images/p191-large.jpg', array('alt' => 'Pant Suit', 'width' => '80', 'height' => '97', 'class' => 'zoom-tiny-image')),
'images/p191-large.jpg',
array('class' => 'cloud-zoom-gallery', 'title' => 'Women\'s Crepe Printed Black', 'escape' => false, 'rel' => "useZoom: 'zoom11', smallImage: 'images/p191.jpg' ")
);
?>
To make sure it working properly, you have to check two things. Path of image (first argument of image()
function) should have full path if it's not located under webroot/img or if it's there, starting /
could be ommited.
The second thing to check is your url location (second argument in link()
function). You can pass it as string or as routing array as well. In your example you pass really weird array.