改变Zend Framework 2分页中的样式

时间:2016-05-02 21:37:51

标签: css twitter-bootstrap zend-framework pagination

我正在尝试将Zend Framework 2的分页中的默认样式替换为使用Twitter Boostrap的分页样式。虽然改变了风格,但我遇到了麻烦,因为有些元素已关闭,我不知道为什么。这是我的代码:

    <nav>
<ul class="pagination">
<?php if ($this->pageCount): ?>
<!-- Previous page link -->
<?php if (isset($this->previous)): ?>
   <li class="previous"><a href="<?php echo $this->url($this->route, array('page' => $this->previous)); ?>">
   <span aria-hidden="true">&laquo;</span></a></li>
<?php else: ?>
  <li class="previous disabled">&laquo;</span> 
<?php endif; ?>

<!-- Numbered page links -->
<?php foreach ($this->pagesInRange as $page): ?>
  <?php if ($page != $this->current): ?>
    <li class="active"><a href="<?php echo $this->url($this->route, array('page' => $page)); ?>">
        <?php echo $page; ?>
    </a></li>
  <?php else: ?>
   <?php echo $page; ?>
  <?php endif; ?>
<?php endforeach; ?>

<!-- Next page link -->
<?php if (isset($this->next)): ?>
  <li class="next"><a href="<?php echo $this->url($this->route, array('page' => $this->next)); ?>">
    <span aria-hidden="true">&raquo;</span></a></li>
<?php else: ?>
  <li class="next disabled">&raquo;</li
<?php endif; ?>
<?php endif; ?>
</ul>
</nav>

如果有帮助,这里是我想说的截图。

enter image description here

如您所见,元素已关闭。任何帮助将不胜感激。

谢谢!

1 个答案:

答案 0 :(得分:0)

没关系修复它,没有使用正确的属性。