diff --git a/app/index/controller/Attachment.php b/app/index/controller/Attachment.php index ae49b874..af288e40 100644 --- a/app/index/controller/Attachment.php +++ b/app/index/controller/Attachment.php @@ -120,6 +120,10 @@ class Attachment extends Common 'id' => $param['id']??null ] ]); + + if (!$videos->isEmpty()) { + $videos->setCollection($videos->getCollection()->chunk(2)); + } View::assign('videos', $videos); View::assign('page', $videos->render()); diff --git a/app/index/view/attachment/video.html b/app/index/view/attachment/video.html index 6447bbdc..cab1f2b4 100644 --- a/app/index/view/attachment/video.html +++ b/app/index/view/attachment/video.html @@ -37,7 +37,7 @@