手動安裝
1. 下載檔案 yii-fancybox
2. 將目錄 assets 及檔案 FancyBox.php 放到目錄 protected/extensions/fancybox 底下
3. 將底下程式碼放到 views 中
$this->widget('application.extensions.fancybox.FancyBox', array( 'target' => 'a[rel=gallery]', 'config' => array(), ));
git 安裝成 submodule
1. 使用下列指令安裝 yii-fancybox
git submodule add https://github.com/ChouAndy/yii-fancybox.git protected/extensions/fancybox
3. 將底下程式碼放到 views 中
$this->widget('application.extensions.fancybox.FancyBox', array( 'target' => 'a[rel=gallery]', 'config' => array(), ));
大功告成!!
文章標籤
全站熱搜