friendica/friendica — pull request #695 by fabrixxm (2013-06-13 12:26:50+00:00)
Title: move html from paginate functions to template

- add new `paginate.tpl` template
- add new `paginate_data(&$a, $count=null)` function wich returns data as array for template
- `paginate()` and `alt_pager()` use `paginate_data()` and template to return html

with this is possible also to insert pagination in page without append it to output string in view function:
```php
function mymod_content(&$a){

$pager = paginate_data($a);

$tpl = get_markup_template('mymod.tpl');
return replace_macros($tpl, array(
'pager' => $pager
));
}
```
(in mymod.tpl : )
```tpl

MyMod

{{include "paginator.tpl"}}

Look Ma! Paginator on top!

```