Jump to content

Recommended Posts

Posted

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.

Posted

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,
]);

 

  • Like 2
Posted

Great! 

 

$modules->getConfig('MarkupPagerNav');

Thanks for this push in the right direction!

  • Like 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...