组合 ExpressionEngine 矩阵字段
无论如何,是否可以组合两个单独的矩阵字段内的行?
我有一个画廊,里面有图片和视频。现在我有两个矩阵字段,照片和视频,具有文件单元格类型和文本单元格类型。我的画廊首先显示照片,而不是视频。有没有办法组合这些字段类型,以便组合照片和视频的顺序?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最好的选择是对照片和视频使用单个矩阵字段。您可以将第一列标记为“上传图像”,然后将第二列标记为“或粘贴视频链接”。
在模板渲染期间混合这两个字段需要在模板中执行一堆 PHP,或者使用查询模块执行一些自定义查询。
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.