getgrav / grav-plugin-admin

Grav Admin Plugin
http://getgrav.org
MIT License
356 stars 226 forks source link

Feature Question/Request: List type (field/parameter/functionality) #703

Open 23d1 opened 8 years ago

23d1 commented 8 years ago

Any plans on implementing a list field type where for example you set a list to be a row, within that list you have various list types, such as image, text, video, which are in and of themselves list fields albeit different kinds of lists that you can array in an order with the attributes/inputs being what they are?

Templating wise that could be{% if list type = image %}<img src="{{ image.file }}" width="image.file.width" height="{{ image.file.height }}"><div>{{ image.parameter1 }}</div><span>{{ image.title }}</span>{% endif %} Yes, no, maybe?

rhukster commented 8 years ago

We have that already with "list" field: https://learn.getgrav.org/forms/blueprints/fields-available#the-list-field. You can nest lists although this is not really advised as it gets confusing very quickly.

23d1 commented 8 years ago

That's not the same functionality though. Basically, what I'm looking for is the ability to assign different list-content for different list items. So you would have multiple lists within the list to pick from. [image] would have fields for image, grid width perhaps a caption, while [text] would be a markup input with grid width and perhaps radio buttons for alignment (left/center/right). Know what I mean?

Basically the ability to have different kinds of content that you can add to the array. Much how the matrix field works in Craft CMS, or the repeater field in ACF Pro for Wordpress.

TomS- commented 6 years ago

Matrix field is often what it's referred to, I'm looking into Grav as I'm interested in Flat-File, I'm also trying to find out if Matrix Fields is an option as I use them often.