带图像的CakePHP分页

带图像的CakePHP分页,cakephp,pagination,Cakephp,Pagination,我有来自HTML编码器的上一个箭头的代码 <img src="<?=$this->webroot?>img/arrow_button_prev.png" alt="Previous Event" style="opacity:1.0;filter:alpha(opacity=100); " onmouseover="this.style.opacity=0.7;this.filter.alpha.opacity=70" onmouseou

我有来自HTML编码器的上一个箭头的代码

<img src="<?=$this->webroot?>img/arrow_button_prev.png" alt="Previous Event"
        style="opacity:1.0;filter:alpha(opacity=100); " onmouseover="this.style.opacity=0.7;this.filter.alpha.opacity=70" 
        onmouseout="this.style.opacity=1.0;this.filter.alpha.opacity=100" />
webroot?>img/arrow\u button\u prev.png“alt=”上一个事件“
style=“不透明度:1.0;过滤器:α(不透明度=100);“onmouseover=”this.style.opacity=0.7;此.filter.alpha.opacity=70“
onmouseout=“this.style.opacity=1.0;this.filter.alpha.opacity=100“/>
我需要把这个图像重新整理成页码

 <?php echo $this->Paginator->prev('<< ' , array(), null, array('class'=>'disabled'));?>

我试图替换尝试以下操作:

<?php
echo $this->paginator->prev($html->image('arrow_button_prev.png'), array('escape' => false), null, array('class'=>'disabled'));
?>

试试这个:

<?php
echo $this->paginator->prev($html->image('arrow_button_prev.png'), array('escape' => false), null, array('class'=>'disabled'));
?>

您需要将“escape”=>设置为false以防止转义图像标记。

您需要将“escape”=>设置为false以防止转义图像标记。

对于CakePHP 1.3,请尝试以下操作: Ex:prev按钮:

<?php 
    $prev_img = $html->image("button/compare-slider-btn-l.png", array("width" => "31px", "height" => "90px", "id" => "cmp_slider_click_l"));
    echo $this->Paginator->prev(!$this->Paginator->hasPrev() ? null : $prev_img, array('escape' => false), !$this->Paginator->hasPrev() ? __($prev_img, false) : null, array('class'=>'disabled'));
?>

在CakePHP 1.3中尝试以下方法: Ex:prev按钮:

<?php 
    $prev_img = $html->image("button/compare-slider-btn-l.png", array("width" => "31px", "height" => "90px", "id" => "cmp_slider_click_l"));
    echo $this->Paginator->prev(!$this->Paginator->hasPrev() ? null : $prev_img, array('escape' => false), !$this->Paginator->hasPrev() ? __($prev_img, false) : null, array('class'=>'disabled'));
?>


这在这里的选项部分有说明。这在这里的选项部分有说明。SI建议您将样式移动到css文件。我建议您将样式移动到css文件。