CakePHP Paginator与图像链接?

问题描述:

我想将Paginator-Link与图像组合在一起。CakePHP Paginator与图像链接?

要加载我使用的图像:(显示的图像,没有任何问题)

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

我的自定义分页程序链接:(显示的链接,没有任何问题)

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

两者一起将显示一个链接,并没有图像:

$this->Paginator->link($this->Html->image('arrow_up.png', array("alt" => "Duration DESC")),array('sort' => 'Item.vidduration', 'direction' => 'desc')); 

输出:

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

哪里是我的错?

+0

输出为img标签,但你说,它显示一个链接,没有图像?这应该是另一种方式,或者我错过了什么? – JJJ

+0

你应该使用CSS来代替 – Dunhamzzz

+0

是的,它应该是相反的。 我无法使用CSS,因为我通过php调用Paginator。 – grosseskino

试试这个

<?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

谢谢,作品非常好 – grosseskino