0
当在CakePHP 2.4.4中使用分页符号助手时,在选项中设置'tag'=> false似乎会导致'class'和' currentClass'选项被忽略。
使用下面的设置:
<?php echo $this->Paginator->numbers(array('separator' => '', 'currentClass' => 'btn btn-primary', 'class' => 'btn btn-default')); ?>
的HTML输出看起来是这样的:
<span class="btn btn-default">
<a href="/callhistory/page:3">3</a>
</span>
但是,当我设置 '标签'=>假:
<?php echo $this->Paginator->numbers(array('separator' => '', 'currentClass' => 'btn btn-primary', 'class' => 'btn btn-default', 'tag' => false)); ?>
html输出如下所示:
<a href="/callhistory/page:3">3</a>
我希望它是这个样子,因为这是prev和next助手的行为:
<a href="/callhistory/page:3" class="btn btn-default">3</a>
这是预期的行为?我希望我的按钮被格式化,如上面的代码所示。我不确定我是否做错了事。
这看起来可能是一个错误。我在Github上就此开了一个问题。 https://github.com/cakephp/cakephp/issues/2833 – When1ConsumeMem