我不知道从哪里开始显示文件集中的文件,以便在点击时显示一个花式画廊。我想从链接打开画廊。单击时显示图库,即具有相同 rel 但设置为 display:none 的图像(由我的 css 轻松控制)。我可以通过选择一个图像来做到这一点,但不确定如何将图像从文件集中传递到视图中(我假设我需要在我的控制器中创建某种函数来获取 fsID,只是不确定如何) . 我只需要在页面上显示第一张图像(缩略图),然后单击链接,它会显示更多全尺寸图像。
基本上,如果你知道 Concrete5,我希望它像图像块一样,除了管理员可以选择一个文件集而不是一个图像。
这是我的view.php
$picture = $this->controller->getPicture();
if ($picture) {
$bigPicture = $image->getThumbnail($picture,600,600)->src;
$smallPicture = $image->getThumbnail($picture,200,200)->src;
echo "<img src=" . $smallPicture . " alt=" . $imageTitle . " title=" . $imageTitle . "/>";//thumbnail picture
echo "<div id=\"image-modal\">";
echo "<a href=" . $bigPicture . " class=\"fancybox-thumb\" rel=" . $title . " title=" . $imageTitle . ">{$linkText}</a>";//open fancybox from link
echo "<div class=\"hiddenGallery\" style=\"display:none;\">";//hidden images
echo "<a href=\"images/pattern/t-103-n.jpg\" class=\"fancybox-thumb\" rel=" . $title . " title=" . $imageTitle . ">";
echo "<img src=\"images/pattern/t-103-n.jpg\" class=\"fancybox-thumb\" />";
echo "</a>";
echo "</div>";
echo "</div>";
}
我的控制器.php
function getPicture() {
if ($this->fIDpicture > 0) {
return File::getByID($this->fIDpicture);
}
return null;
}
我的 add.php
$al = Loader::helper('concrete/asset_library');
echo $al->image('ccm-b-image', 'fIDpicture', t('Choose File'),
$this->controller->getPicture());
echo '</div>';
非常感谢任何和所有帮助。