GrafiteInc / CMS

Decoupled CMS for any Laravel app, gain control of: pages, blogs, galleries, events, images, custom modules and more.
https://cms.grafite.ca
MIT License
495 stars 104 forks source link

Feature request: Core install + modules #167

Open yapsr opened 6 years ago

yapsr commented 6 years ago

IMHO it would be good practice if the core of this CMS could be installed without the currently included precooked modules for blog, pages, events, faqs and promotions inside the package. Although these modules give new users a head start, it is a pain to remove these modules or change their behaviour afterwards.

The simplest solution to accomplish this would be to (optionally) publish these modules in the separate /cms/Modules folder during setup, where the php artisan make:crud saves the template output. This way developers can choose to modify the modules easily.

Another solution would be to create a new package for these modules. I think the images, files and menu could be moved to separate packages as well.

yapsr commented 6 years ago

@mlantz I'm looking forward to deliberate on this subject, Matt. I'm running into the problem that I would like to implement my own version of FAQs. i just would like to be able to fully extend the current FAQ module or fully disable it in the config/cms.php file. But unfortunately that is not possible without creating a whole new module with a funny name like 'myFAQs' or something similar.

mlantz commented 6 years ago

Hmmm, I need to mull on this. I'm not against the idea, but I need to mull on this.

mlantz commented 5 years ago

Hey @yapsr I did some mulling on this, and I started a concept in the branch core-modules take a look at that, it essentially would let you only publish some modules but I'm still mulling on it all

yapsr commented 5 years ago

@mlantz I've just scanned your changes in the core-modules branch and I think I understand your changes. If I'm correct you make the install of some models, views, controllers etc optional during setup in the existing code. That is a good first start.

What I would recommend is to additionally move all blog, pages, events, faqs and promotions related code to a separate grafiteCMS-examples package. Installing this package would install these modules to the cms/Modules folder in the existing Laravel application. Just like the php artisan make:crud command! This separate package could be a added tot the main Laravel application composer.json file.

The GrafiteCMS directory in the vendor folder would then contain just the minimum required core functionality for the CMS, like the basic backend UI, files, documents, users, security etc.

mlantz commented 5 years ago

On a technicality @yapsr the users, security etc is added by Grafite Builder, its not a core portion of the CMS. The CMS is intended to be a small addition to an application. I like the idea of being able to 'select' which modules you add to your application. I'd rather not separate all the things into smaller packages as it would cause larger changes in the system overall.

I've tested this version with a test site, and created an FAQs module, when I use comment out the core FAQ module and choose to not publish its parts then it's easy to work with the new custom one. I need to think about migrations a bit still but I'd rather avoid having multiple packages that I have to maintain, its just easier to allow a more 'custom' setup