abdus Posted October 2, 2017 Share Posted October 2, 2017 20 minutes ago, bernhard said: Nice idea. And a textarea to post the names of modules to install automatically. And an URL field to post the URL to a gist with a basic setup ^^ Perhaps a pw-bootstrap.php that could be run after the installation? <?php return [ 'installs' => [ 'FieldtypeRepeater', 'InputfieldPageAutocomplete', 'AdminThemeUikit' => 'https://github.com/ryancramerdesign/AdminThemeUikit/archive/master.zip' ], 'fields' => [ ['body' => ['type' => 'textarea']], ['views' => ['type' => 'integer']], ['products' => ['type' => 'table']] ], 'templates' => [ ['post' => ['label' => 'Post']], ['blog' => ['label' => 'Blog']], ['listing' => ['label' => 'Product Listing'], ['product' => ['label' => 'Product', 'urlSegments' => 1]] ], 'pages' => [ '/blog/' => ['template' => 'blog'], '/blog/test-post/' => ['template' => 'post'], '/products/' => ['template' => 'listing'], '/products/test-product/' => ['template' => 'product'] ] ]; Which then could be used to perform a quick setup like this: $bootstrapPath = './pw-bootstrap.php'; if (!file_exists($bootstrapPath)) return; $setup = include($bootstrapPath); function installModule($name) {...} function createField($name, $opts) {...} function createTemplate($name, $opts) {...} function createPage($path, $opts) {...} foreach ($setup as $type => $items) { switch ($type) { case 'installs': foreach ($items as $module) installModule($module); break; case 'fields': foreach ($items as $fields => $opts) createField($field, $opts); break; case 'templates': foreach ($items as $template => $opts) createTemplate($template, $opts); break; case 'pages': foreach ($items as $page => $opts) createPage($page, $opts); } } Performing these manually takes at least 10min, but with an automated system it wouldn't take more than 10-20 seconds 2 Link to comment Share on other sites More sharing options...
bernhard Posted October 2, 2017 Share Posted October 2, 2017 @abdus exactly, but we are getting offtopic here 2 Link to comment Share on other sites More sharing options...
abdus Posted October 2, 2017 Share Posted October 2, 2017 Ups! Ich habe das nicht bemerkt. Having a way to tap into install routine would be great though. Maybe in the next topic. 1 Link to comment Share on other sites More sharing options...
Macrura Posted October 2, 2017 Share Posted October 2, 2017 On 9/22/2017 at 12:18 PM, benbyf said: maybe im looking at an old version then as i dont have the tree link. you can double click the Pages item to page tree, or you can re-enable the Tree submenu item (i always do that). 1 Link to comment Share on other sites More sharing options...
adrian Posted October 2, 2017 Share Posted October 2, 2017 3 hours ago, bernhard said: And a textarea to post the names of modules to install automatically Remember that ModuleToolkit can batch install modules with a list of module class names. 2 Link to comment Share on other sites More sharing options...
bernhard Posted October 2, 2017 Share Posted October 2, 2017 27 minutes ago, adrian said: Remember that ModuleToolkit can batch install modules with a list of module class names. i knew it but still i would prefer a solution during install. the topic is maybe also related to wireshell... personally i don't use either of the mentioned solutions. maybe i'm just too lazy. but maybe there could be a more streamlined or standardized way of doing this... or maybe i should start using moduletoolkit. i'll have a second or third look on my next project 1 Link to comment Share on other sites More sharing options...
netcarver Posted October 2, 2017 Share Posted October 2, 2017 Hmm, now if only the module toolkit were installed by default 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