codeigniter4 / CodeIgniter4

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
5.3k stars 1.89k forks source link

Config for pager #4030

Closed titounnes closed 3 years ago

titounnes commented 3 years ago

I thought, it would be better if the Config / Pager template does not point to CodeIgniter (system) but instead points to App \ Views \ Pager \, so that customization is possible.

public $templates = [ // 'default_full' => 'CodeIgniter\Pager\Views\default_full', 'default_full' => 'App\Views\Pager\default_full', 'default_simple' => 'App\Views\Pager\default_simple', 'default_head' => 'App\Views\Pager\default_head', ];

iRedds commented 3 years ago

The current paths point to the default templates. You can make your own templates and write a path to them. https://codeigniter.com/user_guide/libraries/pagination.html?highlight=pager#view-configuration

samsonasik commented 3 years ago

View with logic content should only live in system/ as possible, as place in app/ means maintenance burden when a bug found.

As @iRedds pointed, if you have a spacific logic for pagination template, you can make your own template.