CakePHP Paginator Link with Image?
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)); ?>
精彩评论