简体   繁体   English

Yii Expander Widget

[英]Yii Expander Widget

I am trying to use Jquery Expander extension for Yii framework, but I can't make it work. 我正在尝试对Yii框架使用Jquery Expander扩展,但是我无法使其工作。

This is the link to the extensions: 这是扩展的链接:

LINK 链接

ERROR: 错误:

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>

VIEW: 视图:

<?php
                $this->widget('application.extensions.expander.Expander',array(
                    'content'=>$data->incidencia_descripcion,
                    'config'=>array('slicePoint'=>10, 'expandText'=>'Leer más', 'userCollapseText'=>'Ocultar', 'preserveWords'=>false)
                ));
            ?>

I tried also: 我也尝试过:

$this->widget('ext.expander.Expander',array(
                        'content'=>$data->incidencia_descripcion,
                        'config'=>array('slicePoint'=>10, 'expandText'=>'Leer más', 'userCollapseText'=>'Ocultar', 'preserveWords'=>false)
                    ));
                ?>

However this works: 但这有效:

$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.
));

when i want to use ckeditor widget for my project i following this way.you can try this way maybe receive your question. 当我想为我的项目使用ckeditor小部件时,我按照这种方式进行操作。您可以尝试这种方式,也许会收到您的问题。 1)download ckeditor from here http://ckeditor.com/download 2)create folder of ckeditor in main folder of yii and place all content of ckeditor in it. 1)从此处下载ckeditor http://ckeditor.com/download 2)在yii的主文件夹中创建ckeditor文件夹,并将ckeditor的所有内容放入其中。 3)download extension from here http://www.yiiframework.com/extension/ckeditor/ and extract it in extensions folder you would have content in 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", ), ) ); ?> 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", ), ) ); ?> <?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", ), ) ); ?> you can try this way for expander widget <?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", ), ) ); ?>您可以尝试这种扩展器小部件的方式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM