Search code examples
pluginscontent-management-systemmatrixexpressionengine

Combining ExpressionEngine Matrix Fields


Is there anyway to combine rows inside of two separate Matrix fields?

I have a gallery where I have pictures and videos. Right now I have two matrix fields, photo and video with a file cell type and a text cell type. My gallery displays photos first, than videos. Is there any way to combine these field types so the order of the photos and videos are combined?


Solution

  • Your best bet is to use a single Matrix field for both photo and video. You could label the columns as "Upload an image" for the first column, then "OR Paste-in a video link" for the second.

    Commingling the two fields during the template rendering would require either doing bunch of PHP in your template, or doing some custom queries with the Query module.