I had created one controller file which can create sitemap.xml file(which is used for seo, google crawler and many other puropse) dynamically with one run.
I had created one controller file which can create sitemap.xml file(which is used for seo, google crawler and many other puropse) dynamically with one run.
In this short how-to I will show how to customize setFlash() to display messages (flashes) styled to be success confirmation, error report or notice information. And how to achieve displaying errors in other way.
Note: Before reading this wiki you should have read the caching part in the Yii guide
Here is my experiment inspired by my own question and others from the forum.
I keep a reference to some simple but painful task if you forget a common or something. I am new to Yii and this took awhile for me to figure out. Everything I read said do this or do that and not a single one worked for me. However, the following did.
will generate twitter bootstrap styled breadcrumb code:
This is the code in the View.
<?php echo CHtml::link('MyDialog', Yii::app()->createUrl('site/page'), array('class' => 'openDlg divDialog')); ?>
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id'=>'divDialog',
'options'=>array( 'title'=>Yii::t('Dialog Title', 'autoOpen'=>false, 'modal'=>true, 'width'=>600)));
?>
<div class="divForForm"></div>
<?php
$this->endWidget(...
Clearing CGridView filters and sort orders from the web pages, is usefull for the end user. Yii does not seem to propose a standard method. Furthermore, this is especially usefull when filters are "remembered" in the user's session.
In this wiki I will show how could wo pass the third parameter to UserIdentity on login authenticate. So we can do separate login authentcation from two or more different models from single login form.
I am going to show you an effective way to validate the uniqueness of multiple columns.
Then, we write this in the config > main.php:
Yii i18n does not cover decimal format. Some languages like Spanish (I live in Argentina) uses comma ',' instead of dot '.' as decimal separator.
There are cases that you want to validate the file format, size, extension etc but how to do that without submit the form ?
Suppose you have an Application in Yii that manages hotels each one has many customers.
The keywords will be stored in a text field in a comma delimited format. The keywords will be created by the site administrator.
I did not invent this instructions, I read it somewhere and re-organized in my way as I was trying and it works for me;
After reading the other wiki article regarding token based access, I thought that it might be interesting to share my method.
After installing Yii basic application on our systems, most of the time we want to have multiple environment such as local, dev and live setup. Most of the times when we want to make changes to configuration file, we have to over-write configurations file for each environment.
Through the YouTube API you can upload files directly to the Youtube server. Youtube currently offers two services 1. Direct Link 2. Browser Based Uploading. In this wiki I will demonstrate how you can quickly set Browser Based Uploading for your Yii application. This is the protocol request that takes place.