【发布时间】:2011-07-18 06:44:31
【问题描述】:
我想将 Paginator-Link 与图像结合起来。
要加载我使用的图像:(显示图像,没有任何问题)
$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" />
我的错误在哪里?
【问题讨论】:
-
输出的是一个img标签,但是你说它显示的是链接,没有图片?应该反过来还是我错过了什么?
-
你应该改用 CSS
-
是的,应该反过来。我无法使用 CSS,因为我通过 php 调用 Paginator。
标签: image cakephp hyperlink pagination