I was wondering if anyone has gotten the pikachoose slider to work with Yii?
I installed it and it shows the slider, but it doesn’t actual slide the images. The next/previous links and arrows don’t do anything - neither does clicking on the thumbnails.
Any help would be greatly appreciated.
MichaelG
(Aceandember)
May 17, 2013, 1:01am
2
This is in my view. Works… I’m still tweaking it to look good but it slides etc.
You can / should replace $this->cssPath with the path to your css and $this->jsPath with the path to your js and make sure the files are where you point it.
<?php
Yii::app()->getClientScript()->registerCssFile($this->cssPath. 'slideshow.css');
Yii::app()->getClientScript()->registerScriptFile($this->jsPath. 'jquery.js',CClientScript::POS_HEAD);
Yii::app()->getClientScript()->registerScriptFile($this->jsPath. 'jquery.jcarousel.min.js',CClientScript::POS_HEAD);
Yii::app()->getClientScript()->registerScriptFile($this->jsPath. 'jquery.pikachoose.min.js',CClientScript::POS_HEAD);
?>
<script language="javascript">
$(document).ready(
function (){
$("#cc_slideshow_main").PikaChoose({carousel:true,carouselOptions:{wrap:'circular'}});
});
</script>
<div class="row blue">
<div class="pikachoose">
Basic example - with looping carousel
<ul id="cc_slideshow_main" class="jcarousel-skin-pika">
<li><a href="http://www.test.com" target="none"><img src="<?php echo $this->imgPath ?>slide1.png"/></a><span>slide1Text</span></li>
<li><a href="http://www.test.com" target="none"><img src="<?php echo $this->imgPath ?>slide2.png"/></a><span>slide2Text</span></li>
<li><a href="http://www.test.com" target="none"><img src="<?php echo $this->imgPath ?>slide3.png."/></a><span>slide3Text and link example -> <a href="http://www.pikachoose.com"> click here</a> </span></li>
<li><a href="http://www.test.com" target="none"><img src="<?php echo $this->imgPath ?>slide4.png"/></a><span>slide4Text</span></li>
<li><a href="http://www.test.com" target="none"><img src="<?php echo $this->imgPath ?>slide5.png"/></a><span>slide5Text</span></li>
</ul>
</div>
slideshow.css is a merge of bottom.css and base.css in the pikachoose-4.5.0\styles folder
wow that so great Mr.MichaelG
hello mr
your code have this error:
…
CException
Alias "application.extensions.slider.slider" is invalid. Make sure it points to an existing PHP file and the file is readable.
C:\wamp\www\yii\framework\YiiBase.php(322)