'enableAjaxValidation'=>true, 'clientOptions' => array( 'validateOnSubmit' => true, 'validateOnChange' => false, 'validateOnType' => false, // 'errorCssClass' => 'has-error', // 'successCssClass' => 'has-success', // 'afterValidate' => 'js:function(form, data, hasError){}' ), 'htmlOptions' => array('enctype' => 'multipart/form-data'),
Tuesday, December 8, 2015
Yii validation OnSubmit OnChange
Thursday, December 3, 2015
Yii MetaTags
Yii::app()->clientScript->registerMetaTag(null, null, null,array('charset'=>'utf-8')); Yii::app()->clientScript->registerMetaTag('IE=edge',null,null,array('http-equiv'=>'X-UA-Compatible')); Yii::app()->clientScript->registerMetaTag('text/html;charset=UTF-8', null, 'content-type'); Yii::app()->clientScript->registerMetaTag('width=device-width, initial-scale=1.0',null,null,array('name'=>'viewport')); Yii::app()->clientScript->registerMetaTag(Yii::app()->name, 'author'); Yii::app()->clientScript->registerMetaTag('Jibon Bikash Roy, jibon.bikash@gmail.com', 'developer');
Yii::app()->clientScript->registerMetaTag('Keyword1, keyword2', 'keywords'); //Output
Yii::app()->clientScript->registerMetaTag('Site Description Details', 'description'); //Output
Yii::app()->clientScript->registerMetaTag('text/html;charset=UTF-8', null, 'content-type'); //Output
Yii::app()->clientScript->registerMetaTag('userid=xyz; expires=Wednesday, 08-Aug-15 23:59:59 GMT;', null, 'cookie'); //Output
Yii::app()->clientScript->registerMetaTag('NOINDEX, NOFOLLOW', 'ROBOTS'); //Outputfacebook Share Metataq
Yii::app()->clientScript->registerMetaTag('INDEX, NOFOLLOW', 'ROBOTS'); //Output
Yii::app()->clientScript->registerMetaTag('NOINDEX, FOLLOW', 'ROBOTS'); //Output
Yii::app()->clientScript->registerMetaTag(Yii::app()->getBaseUrl(true).'/uploads/workshop/thumbs/'.$model->banner, null, null, array('property' => "og:image")); Yii::app()->clientScript->registerMetaTag($model->course_title, null, null, array('property' => "og:title")); Yii::app()->clientScript->registerMetaTag($this->createAbsoluteUrl('longCourse/view',array('id'=>$model->id)), null, array('property' => "og:url")); Yii::app()->clientScript->registerMetaTag(Yii::app()->name, null, null, array('property' => "og:site_name")); Yii::app()->clientScript->registerMetaTag("website", null, null, array('property' => "og:type"));
Subscribe to:
Posts (Atom)