Welcome Guest, Not a member yet? Register   Sign In
Is it possible to have a Pager config file in a module's config directory?
#1

I'm working on a blog module for CI4 and I want to customize the pagination links. 

In the doc it says the pager view can be overridden in app/Config/Pager.php, and in module's doc it says you can have a Config directory for your module, but there's not much examples other than how to load a custom config file.

Can I have a Pager config file in my module? Something like my-module/Config/Pager.php? I can't make it work. Maybe I need to override the pager service to load my module's config?
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#2

I'm back with this problem...

I just reinstalled a new test site with CI 4.0.2 and I'm still stuck with this problem. For my app to use the custom pagination template from my module, I need to edit app/Config/Pager.php because CI won't load my-module/Config/Pager.php.

In the debug toolbar, I can see that only APPPATH/Config/Pager.php is loaded. Is this a bug? Did we forget to check if there's a Pager.php file in a module's config directory?
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB