wbrowar / craft-grid

A field that lets you content manage CSS Grid in Craft CMS.
Other
18 stars 2 forks source link

Invalid field handle #6

Closed modulareverything closed 5 years ago

modulareverything commented 5 years ago

I just purchased Grid as it seemed like the perfect solution to a problem I'm having; the client wants to be able to dynamically resize images in a gallery.

The problem is they also want to be able to add multiple galleries, as well as other components, using a matrix. I'm using Neo for this.

I'm concerned now that actually these two plugins don't work together and I've just wasted $40. When I save out a grid I get an error; Invalid field handle: images. This only appears when I use Grid with Neo, whether I use one Grid field or multiple.

Is it a case that these two just don't play nice? Is there anything I can do to fix it?

wbrowar commented 5 years ago

Hi Chrish, because Neo and Supertable are complicated fields, I only added support for Craft and Commerce's core element fields (here's the list of supported field types) to keep the scope of this plugin simple in regards to the feature that lets you watch a field and the grid field gets updated as new content is added to the target field.

On the other hand, it might be possible to use a Grid field within a Neo block if you manually add items to the Grid field (by setting Target Field to None in the field settings). In that case, you might be able to put multiple Grid fields into your Neo field to handle those gallery matrix fields. When you render them with Twig, you'll need to pass in the Matrix fields as arrays (using .all()) into the grid block, as shown here: https://github.com/wbrowar/craft-grid#target-array

Let me know if that works.