我正在尝试为Yii框架使用Jquery Expander扩展,但我无法使其工作。
这是扩展程序的链接:
错误:
Error 500: <h1>CException</h1>
<p>Alias "ext.expander.Expander" is invalid. Make sure it points to an existing PHP file and the file is readable. (/Applications/XAMPP/xamppfiles/htdocs/yii/framework/YiiBase.php:322)</p>
查看:
<?php
$this->widget('application.extensions.expander.Expander',array(
'content'=>$data->incidencia_descripcion,
'config'=>array('slicePoint'=>10, 'expandText'=>'Leer más', 'userCollapseText'=>'Ocultar', 'preserveWords'=>false)
));
?>
我也试过了:
$this->widget('ext.expander.Expander',array(
'content'=>$data->incidencia_descripcion,
'config'=>array('slicePoint'=>10, 'expandText'=>'Leer más', 'userCollapseText'=>'Ocultar', 'preserveWords'=>false)
));
?>
然而这有效:
$this->widget('ext.google.XGoogleChart',array(
'type'=>'pie',
'title'=>'Browser market 2008',
'data'=>array('IE7'=>22,'IE6'=>30.7,'IE5'=>1.7,'Firefox'=>36.5,'Mozilla'=>1.1,'Safari'=>2,'Opera'=>1.4),
'size'=>array(400,300), // width and height of the chart image
'color'=>array('6f8a09', '3285ce','dddddd'), // if there are fewer color than slices, then colors are interpolated.
));
答案 0 :(得分:0)
当我想按照这种方式使用ckeditor小部件为我的项目。你可以尝试这种方式可能会收到你的问题。
1)从这里下载ckeditor http://ckeditor.com/download
2)在yii的主文件夹中创建ckeditor的文件夹,并将ckeditor的所有内容放入其中。
3)从这里下载扩展http://www.yiiframework.com/extension/ckeditor/
并在extensions文件夹中解压缩
你会有扩展内容\ ckeditor \
4)<?php $this->widget('application.extensions.ckeditor.CKEditorWidget',array(
"model"=>$model, # Data-Model
"attribute"=>'experience', # Attribute in the Data-Model
#"defaultValue"=>$model->experience, # Optional
"config" => array(
"height"=>"200px",
"width"=>"400px",
"toolbar"=>"Basic",
),
) ); ?>
你可以尝试这种方式扩展器小部件