Releases for sf 1.4
| Version |
License |
API |
Released |
|
1.0.3stable
|
MIT license |
1.0.3stable
|
14/05/2010 |
|
1.0.2stable
|
MIT license |
1.0.2stable
|
07/05/2010 |
Releases for sf 1.3
| Version |
License |
API |
Released |
|
1.0.3stable
|
MIT license |
1.0.3stable
|
14/05/2010 |
|
1.0.2stable
|
MIT license |
1.0.2stable
|
07/05/2010 |
Releases for sf 1.2
| Version |
License |
API |
Released |
|
1.0.3stable
|
MIT license |
1.0.3stable
|
14/05/2010 |
|
1.0.2stable
|
MIT license |
1.0.2stable
|
07/05/2010 |
|
1.0.1stable
|
MIT license |
1.0.1stable
|
06/05/2010 |
Releases for sf 1.1
| Version |
License |
API |
Released |
|
1.0.3stable
|
MIT license |
1.0.3stable
|
14/05/2010 |
|
1.0.2stable
|
MIT license |
1.0.2stable
|
07/05/2010 |
|
1.0.1stable
|
MIT license |
1.0.1stable
|
06/05/2010 |
Changelog for release 1.0.3 - 14/05/2010
- Dan: Added config options for entries per page in app.yml
- Dan: Added default css for pagination menu generated
- Agustin: Fixed a parameter parser bug (Thanks)
Other releases
Release 1.0.3 - 14/05/2010
- Dan: Added config options for entries per page in app.yml
- Dan: Added default css for pagination menu generated
- Agustin: Fixed a parameter parser bug (Thanks)
Release 1.0.2 - 07/05/2010
- Dan: Added support for custom queries (see README)
Release 1.0.1 - 06/05/2010
- Dan: Fixed the format of README
sfPaginationPlugin plugin
The sfPaginationPlugin is a symfony plugin that provides a better and
a easy way to use pagination in symfony.
It manages pagination and also generates a table for pagination navigation.
Installation
Install the plugin
$ symfony plugin:install sfPaginationPlugin
Enable one or more modules in your settings.yml (optional)
Clear you cache
$ symfony cc
Configure the CSS classes of the rendered pagination in /plugins/sfPaginationPlugin/config/app.yml:
all:
sfPaginationPlugin:
#class of parent UL
ul_class: pagination-flickr
#class of li for next button
li_next: next
#class of li for previous button
li_prev: previous
#class of li for active page button
li_active: active
#class of li for normal page button
li: ''
#default number of entries per page
default_entries: 20
#a list of all available option for entrie per page
entries_per_page: [20,60,80,100]
Using in you application
Aditional features
Move additional parameters thru pages
// Adds a parameter to the pagination links
// First: label
// Second: value
$pgr->AddParam('id', 4);
What it does
It uses Symfony Pager to create a simple way to paginate
The Pagination menu is the following form
<style>
#sfPaginationPluginCssUl li{
border:0; margin:0; padding:0;
font-size:11px;
list-style:none;
}
#sfPaginationPluginCssUl a{
border:solid 1px #DDDDDD;
margin-right:2px;
}
#sfPaginationPluginCssUl .next a,
#sfPaginationPluginCssUl .previous a {
font-weight:bold;
border:solid 1px #FFFFFF;
}
#sfPaginationPluginCssUl .active{
color:#ff0084;
font-weight:bold;
display:block;
float:left;
padding:4px 6px;
}
#sfPaginationPluginCssUl a:link,
#sfPaginationPluginCssUl a:visited {
color:#0063e3;
display:block;
float:left;
padding:3px 6px;
text-decoration:none;
}
#sfPaginationPluginCssUl a:hover{
border:solid 1px #666666;
}
</style>
<table width="100%">
<tr>
<td width="60%">
<ul class="ul_class">
<li class="li_prev">
<a>
Prev
</a>
</li>
<li class="li_active">
<a>
1
</a>
</li>
<li class="li">
<a>
2
</a>
</li>
<li class="li">
<a>
3
</a>
</li>
<li class="li_next">
<a>
Next
</a>
</li>
</ul>
</td>
<td width="40%">
<ul class="ul_class">
<li class="li_prev">
Entries
</li>
<li class="li_active">
<a>
20
</a>
</li>
<li class="li">
<a>
60
</a>
</li>
<li class="li">
<a>
100
</a>
</li>
</ul>
</td>
</tr>
</table>