开发者

CakePHP Paginator Link with Image?

开发者 https://www.devze.com 2023-03-20 17:36 出处:网络
I want to combine Paginator-Link with an image. To load an image I use: (Displays the image, without any problem)

I want to combine Paginator-Link with an image.

To load an image I use: (Displays the image, without any problem)

$this->Html->image('arrow_up.png');

My custom Paginator Link: (Displays the link, without any problem)

$this->Paginator->link('',array('sort' => 'Item.vidduration', 'direction' => 'desc'));

.

.

Both together will show a link and no image:

$this->Paginator->link($this->开发者_如何学编程;Html->image('arrow_up.png', array("alt" => "Duration DESC")),array('sort' => 'Item.vidduration', 'direction' => 'desc'));

output:

<img src="/img/arrow_up.png" alt="Duration DESC" />

Where is my mistake?


Try this

<?php echo $this->Paginator->link($html->image('arrow_up.png', array("alt" => "Duration DESC")),array('sort' => 'Item.vidduration', 'direction' => 'desc'), $options = array('escape' => false)); ?>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号