nitra / e-commerce-site-slideshowbundle

此包已被 废弃 且不再维护。未建议替代包。

幻灯片包

安装: 447

依赖: 0

建议者: 0

安全: 0

类型:symfony-bundle

v1.0 2014-07-29 10:17 UTC

This package is auto-updated.

Last update: 2018-04-27 10:32:08 UTC


README

连接路由

    # app/config/routing.yml
    # ...
    nitra_slideshow:
        resource: "@NitraSlideshowBundle/Resources/config/routing.yml"
        prefix:   /
    # ...

在 AppKernel.php 中添加

    # app/AppKernel.php

    # ...
    public function registerBundles()
    {
        $bundles = array(
            # ...
            new Nitra\SlideshowBundle\NitraSlideshowBundle(),
        );
    }
    # ...

在项目中使用

连接脚本

默认在主模板中连接(e-commerce-site/storebundle/Nitra/StoreBundle/Resources/views/baseLayout.html.twig)在供应商中,用于所有轮播,无需额外连接

在模板中添加的示例

    # src/Nitra/StoreBundle/Resources/views/Home/homePage.html.twig

    # ...
    {% render controller("NitraSlideshowBundle:Slideshow:slideshow", {'pager':'true','controls':'false'}) %}
    # ...

幻灯片配置描述

配置的完整描述:[http://bxslider.com/options](http://bxslider.com/options)

传递给控制器的幻灯片可用配置

  • pause - 显示幻灯片的间隔 integer,默认 2000
  • controls - 滚动按钮(上一个,下一个) boolean(true / false),默认 true
  • autoControls - Start/Stop 按钮 boolean(true / false),默认 false
  • pager - 分页 boolean(true / false),默认 false
  • auto - 自动滚动 boolean(true / false),默认 true
  • mode - 'horizontal', 'vertical', 'fade',默认 horizontal
  • speed - 速度 integer,默认 2000
  • slideMargin - 幻灯片间距 integer,默认 0

如需使用额外的配置,必须在模板中重定义包和幻灯片初始化块