Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow sections, categories and fields to be "scaffolded" #881

Closed
angrybrad opened this issue Jan 31, 2017 · 7 comments
Closed

Allow sections, categories and fields to be "scaffolded" #881

angrybrad opened this issue Jan 31, 2017 · 7 comments

Comments

@angrybrad
Copy link
Member

Created by: Jason McCallister (themccallister@gmail.com) on 2015/03/20 17:34:31 +0000
Votes at time of UserVoice import: 18


There are quite a few situations where it would be great to have a simple file type (we could check into version control) that lets us setup a section, categories and fields. This leaves the concern that it could possibly overwrite the changes made in the CMS so a mechanism to “scaffold” the sections through the control panel, or more preferably during a Craft CMS installation, would be a great addition to our workflow.

This would also help Craft with CI. Being able to scaffold the main pieces of the CMS would allow testing critical pieces of the application (we would probably need a way to seed content into the CMS as well).


Original idea:

Some CMSs - eg, Bolt and Kirby - require sections and fields to be created with a YAML file. This means that setting up a new site similar to a previous build is very quick: just a matter of copy+paste.

Whilst I don't think that the process of creating sections and fields in Craft should be like this, it would be great to have this as one method of setting up a site.

The way I imagine this working is that the Control panel has a section where you can upload a YAML file detailing some fields and/or sections that you'd like created. Craft would then read this file and generate the relevant tables and rows in the DB based on its content. These would then appear and be visible and usable like sections and fields generated in the usual manner.

In this way, this feature would not force current developers to change their method of setting up Craft sites, but would allow some developers to speed up their workflow.

@angrybrad
Copy link
Member Author

Posted by Adam Menczykowski (adammenczykowski@gmail.com) on 2015/10/01 07:35:28 +0000


This is already possible using 'The Architect' plugin.

https://github.com/Pennebaker/craftcms-thearchitect

@angrybrad
Copy link
Member Author

Posted by Mats Mikkel Rummelhoff (mail@mmikkel.no) on 2015/03/09 00:12:31 +0000


Basically, what Craft needs is an easy way to generate migrations, similar what the Artisan CLI provides for Laravel (https://laravel.com/docs/5.3/migrations#generating-migrations).

Additionally, I was just thinking that it would be awesome if Craft would provide a mechanism for seeding (also like Laravel, see https://laravel.com/docs/5.3/seeding).

@angrybrad
Copy link
Member Author

Posted by Anonymous (belwyn@gmail.com) on 2016/02/03 22:54:53 +0000


Some CMSs - eg, Bolt and Kirby - require sections and fields to be created with a YAML file. This means that setting up a new site similar to a previous build is very quick: just a matter of copy+paste.

Whilst I don't think that the process of creating sections and fields in Craft should be like this, it would be great to have this as one method of setting up a site.

The way I imagine this working is that the Control panel has a section where you can upload a YAML file detailing some fields and/or sections that you'd like created. Craft would then read this file and generate the relevant tables and rows in the DB based on its content. These would then appear and be visible and usable like sections and fields generated in the usual manner.

In this way, this feature would not force current developers to change their method of setting up Craft sites, but would allow some developers to speed up their workflow.

@angrybrad
Copy link
Member Author

Posted by Kyle Weishaupt (kyle@northriverdesign.com) on 2016/08/16 13:44:21 +0000


This would be an amazing addition. I currently re-use a lot of fields, so it would be helpful to quickly add them to new projects.

@jasonmccallister
Copy link
Contributor

This is technically complete in the latest beta, although a complete "scaffold" might not be in place yet...

@angrybrad
Copy link
Member Author

Technically done in a basic sense, but will leave open since we plan to flesh out the features more.

@andris-sevcenko
Copy link
Contributor

Closed via 3878d16

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants