spoetnik Posted Tuesday at 10:27 AM Share Posted Tuesday at 10:27 AM Doubting if this is the correct topic for this question, but here we go... Is it possible to have the Modules configuration in code? With RockMigrations it is possible to have your templates- and fieldsconfiguration in code. I am missing a way to have the configuration of the various modules in use in code. Link to comment Share on other sites More sharing options...
bernhard Posted Tuesday at 10:40 AM Share Posted Tuesday at 10:40 AM Of course RockMigrations can do that. Example migrate.php: <?php namespace ProcessWire; $rm = rockmigrations(); // install modules $rm->installModule('TracyDebugger'); $rm->installModule('RockDevTools'); $rm->installModule('RockFrontend'); $rm->installModule('AdminThemeUikit', [ 'toggleBehavior' => 1, // consistent 'themeName' => '', // original theme ]); $rm->installModule('RockAdminTweaks', [ 'enabledTweaks' => [ 'General:QuickAdd', 'Inputfields:CopyFieldNames', 'Inputfields:ImageDownload', 'PageList:TemplateLink', 'PageEdit:PrevNextPage', ], ]); $rm->installModule('Less', [ 'useCache' => 1, ]); 2 Link to comment Share on other sites More sharing options...
spoetnik Posted Tuesday at 01:34 PM Author Share Posted Tuesday at 01:34 PM Great! $modules->getConfig('MarkupPagerNav'); Thanks for this push in the right direction! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now