Last active
August 29, 2015 14:06
-
-
Save vinacode/f22a62cfcc58a2a67b3f to your computer and use it in GitHub Desktop.
CakePHP 2.4.x with Bootstrap 3 and Pagination
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row"> | |
<?php foreach ($products as $product):?> | |
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12"> | |
<?php echo $this->Html->link($this->Html->image($product['Product']['image']), | |
array('action'=>'view',$product['Product']['id']), | |
array('escape'=>false,'class'=>'thumbnail'));?> | |
<div class="caption"> | |
<h5> | |
<?php echo $product['Product']['name'];?> | |
</h5> | |
<h5> | |
Price: $ | |
<?php echo $product['Product']['price'];?> | |
</h5> | |
</div> | |
</div> | |
<?php endforeach;?> | |
<!-- Pagination --> | |
<ul class="pagination pagination-large pull-right"> | |
<?php | |
echo $this->Paginator->prev(__('prev'), array('tag' => 'li'), null, array('tag' => 'li','class' => 'disabled','disabledTag' => 'a')); | |
echo $this->Paginator->numbers(array('separator' => '','currentTag' => 'a', 'currentClass' => 'active','tag' => 'li','first' => 1)); | |
echo $this->Paginator->next(__('next'), array('tag' => 'li','currentClass' => 'disabled'), null, array('tag' => 'li','class' => 'disabled','disabledTag' => 'a')); | |
?> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment