定制 nzta/gallery 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nzta/gallery

最新稳定版本:2.1.0

Composer 安装命令:

composer require nzta/gallery

包简介

A module for creating a gallery of images with captions

README 文档

README

Provides the ability add a Gallery to any number of page types to provide a gallery of images with captions

Requirements

SilverStripe 4.x or 5.x

Features

  • Able to create a set of GalleryItems that each consist of an image and a caption
  • Define which PageTypes these GalleryItems should be added to through extensions configurations
  • When a galleryitem is clicked on, a lightbox popup shows with carousel functionality

Installation

composer require nzta/gallery

Installing assets

You will need to require in the Requirements::javascript('nzta/gallery: js/gallery.js') in order to display the gallery out of the box and have the lightbox functionality.

There is also a Requirements::css('nzta/gallery: css/main.css) file that can be used to display basic styles for the CarouselModal.

Setting up templates

Once you have the assets being pulled in, you will need to add the gallery to the template, e.g. <% include Gallery %>

You will also need the __galleryData available globally for the JS to work. You can add the following to your <head>:

<script>
    window.__galleryData = {
      items: {$GalleryData}
    }
</script>

Adding the extensions

Now you can add the GalleryExtension to any page type you want to provide a gallery to, e.g.

Page:
  extensions:
    - NZTA\Gallery\Extensions\GalleryExtension

This will provide the CMS fields to add gallery images to the page.

统计信息

  • 总下载量: 2.8k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2018-10-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固