我想在HTML的代碼如何在cakephp的單個鏈接中顯示兩個或三個圖像?
<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>
我在CakePHP中這樣寫代碼來獲得上述結果
<?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' "
)
);
?>
,但得到這個作爲輸出
<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>
我怎麼能做到這一點,請回復這個?
你的問題是一團糟。請考慮重寫。 – Rvervuurt 2014-11-14 13:28:25
請在創建帖子時使用代碼按鈕以良好縮進並突出顯示代碼。你目前的產出是多少? (把它放在'代碼') – RichardBernards 2014-11-14 13:29:22