1

About matrix block fields handles: should they be unique ?

For instance if I have a matrix with handle galleryMatrix, than should I name my block galleryMatrixImage or just image? And than my fields in my block: galleryMatrixImageName, galleryMatrixImageAsset or name and asset?

I'm not quite sure about how to manage these handles the proper way?

I would prefer being able to name them with short handles, but i'm not sure if they have to be unique within a block, or unique for a whole website ?

Thanks

1 Answer 1

1

They only have to be unique within a block. So your initial idea would be best. Have a galleryMatrix field with an image block and fields with handles imgName and imgAsset.

I don't think you can use name as a handle, because it is a reserved word. Asset may be possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.