Image CakePHP分页器与图像的链接?
我想将分页器链接与图像相结合。 要加载图像,我使用:(显示图像,没有任何问题) 我的自定义分页器链接:(显示链接,没有任何问题) 两者一起将显示链接而不显示图像:Image CakePHP分页器与图像的链接?,image,cakephp,hyperlink,pagination,Image,Cakephp,Hyperlink,Pagination,我想将分页器链接与图像相结合。 要加载图像,我使用:(显示图像,没有任何问题) 我的自定义分页器链接:(显示链接,没有任何问题) 两者一起将显示链接而不显示图像: $this->Paginator->link($this->Html->image('arrow_up.png', array("alt" => "Duration DESC")),array('sort' => 'Item.vidduration', 'direction' => 'de
$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" />
我的错在哪里?试试这个
<?php echo $this->Paginator->link($html->image('arrow_up.png', array("alt" => "Duration DESC")),array('sort' => 'Item.vidduration', 'direction' => 'desc'), $options = array('escape' => false)); ?>
输出是一个img标签,但您说它显示一个链接而没有图像?这应该是另一种方式还是我遗漏了什么?你可能应该使用CSS而不是是的,它应该是另一种方式。我不能使用CSS,因为我正在通过php调用分页器。
<img src="/img/arrow_up.png" alt="Duration DESC" />
<?php echo $this->Paginator->link($html->image('arrow_up.png', array("alt" => "Duration DESC")),array('sort' => 'Item.vidduration', 'direction' => 'desc'), $options = array('escape' => false)); ?>