Lesson25 drupal幻灯片模块nivo_slider的介绍

日期:2015-10-24 阅读:2994

Lesson25 drupal幻灯片模块nivo_slider的介绍

官网: https://www.drupal.org/project/nivo_slider

Requirements
Nivo Slider has three dependencies:(它需要先安装以下三个模块)

Drupal core modules  核心模块 block 

Contributed modules

Libraries API - 2.x    https://www.drupal.org/project/jquery_update
jQuery Update - configured to use jQuery 1.7 or higher.   https://www.drupal.org/project/jquery_update


Installation 开始安装
To install Nivo Slider:

Download the latest version of the Nivo Slider jQuery plugin and extract it to sites/all/libraries or sites/sitename/libraries as you require. The extracted folder must be named nivo-slider.在sites/sitename/libraries 下建个目录nivo-slider,并把下载的js插件解压到这里。
Enable Nivo Slider and all of the modules that it requires.启动模块
Configure the jQuery Update module to use jQuery 1.7 or higher. 升级jquery到1.7

-------------

弄好后,效果并没有出来,有js报错 undefined is not a function,说明js没有加载。清下缓存config/development/performance就行了。

--------------

可以在模板里,以代码的形式调用:

    $block = module_invoke('nivo_slider', 'block_view', 'nivo_slider');。
    print render($block['content']); 

参考module_invoke函数调区块》

-------------------------

 

 

<<点击返回

Drupal7视频教程 Drupal7主题 Drupal7最新文档 Drupal7推荐文档