承接 micmania1/silverstripe-nivoslider 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

micmania1/silverstripe-nivoslider

Composer 安装命令:

composer require micmania1/silverstripe-nivoslider

包简介

Nivo Slider module for Silverstripe

README 文档

README

This Silverstripe module brings the Nivo Slider to your project with compelte flexibility.

Features

  • Manage multiple sliders and their content through Silverstripe CMS.
  • Choose between 4 default themes or add your own.
  • Completely customizable with all Nivo jQuery options editable through the CMS

Installation

This module should be put into the root directory of your website.

via Composer

composer require micmania1/silverstripe-nivoslider:1.0.*

via Git

git clone https://github.com/micmania1/silverstripe-nivoslider.git
cd silverstripe-nivoslider
git checkout 1.0.0

Remember to run /dev/build?flush=1 on your site.

Usage

To create a slider you can login to Silverstripe CMS and click 'Nivo Slides' in the left navigation pane.

Click the 'Add Nivo Slider' button which will take you through to a page where you can select a Title for your slider and add invididual slides.

On the advanced tab you can choose the theme and set many other options provided by the Nivo Slider. For more info on these options see the Nivo Slider Documentation.

Adding a Slide to a Page

By default, sliders are stand-a-lone. To add them to a page the NivoSliderSiteTreeExtension and SiteTreeNivoSliderExtension are provided. These two extensions compliment each other by providing reciprical has_one links between the two DataObjects.

The following example shows how to add a slider to a HomePage class which extends Page.

YAML Example:

---
Only:
  classexists: 'NivoSlider'
  classexists: 'HomePage'
---
HomePage:
  extensions:
    - 'NivoSliderSiteTreeExtension'

NivoSlider:
  extensions:
    - 'SiteTreeNivoSliderExtension'
---

PHP Example:

Object::add_extension("HomePage", "NivoSliderSiteTreeExtension");
Object::add_extension("NivoSlider", "SiteTreeNivoSliderExtension");

Once you have this connection (and ran a dev/build?flush=1) you can go to your home page and select a slider from the drop down menu.

You can of course create your own extensions to replace these and the link is not limited to pages. You can use any DataObject including widgets.

Template Usage

For use in your template call the name of your has_one relationship. For example where a page has a has_one relationship of "NivoSlider" => "NivoSlider" you can use:

$NivoSlider

This wil take care of rendering the whole slider.

Adding your own theme

If you have your own Nivo Slider theme which you would like to apply you need to tell NivoSlider where to look for it.

To do this you need to extend the class NivoSliderTheme.

Example:

<?php
class MyNivoSliderTheme extends NivoSliderTheme {
    
    protected $title = "My Custom Theme";
    
    protected $cssClass = "MyCustomTheme";
    
    public function beforeRender() {
        // Require any js/css or do any other prep before rendering
        Require::css("mysite/css/myNivoStyle.css");
    }
}
?>

You can then ?flush=1 and select your theme from the themes drop down menu within the advanced tab of each slider.

micmania1/silverstripe-nivoslider 适用场景与选型建议

micmania1/silverstripe-nivoslider 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 25 次下载、GitHub Stars 达 1, 最近一次更新时间为 2013 年 05 月 11 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 micmania1/silverstripe-nivoslider 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 micmania1/silverstripe-nivoslider 我们能提供哪些服务?
定制开发 / 二次开发

基于 micmania1/silverstripe-nivoslider 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 25
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 4
  • 开发语言: JavaScript

其他信息

  • 授权协议: Unknown
  • 更新时间: 2013-05-11