Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 141-150 of 306 result(s).

How to translate and do the translations the easy way

Created 2 years ago by Roman SolomatinHow-tos3 comments – viewed 43,875 times – ( +26 / -2 ) – version 1.1
I wanted to keep all the I18N related translations in separate files, so that I would not need to modify the view files or the model files every time I need to update or fix the translations of application's source language.
tags: i18n

File uploads in CForm (Form builder)

Created 2 years ago by Luke JurgsHow-tos2 comments – viewed 32,845 times – ( +12 ) – version 1.1
While there is a reasonable amount of documentation regarding CForm (form builder) and file uploads seperately, there really is not any coverage of both in combination.

Insert a multirow header in CGridView

Created about a year ago by PeppeHow-tos2 comments – viewed 8,466 times – ( +4 )
The CGridView widget is very useful and customizable, but sometimes you need a little more. One limit I found is to have only one row for headers; yes, you can write each column header in more than one row, but just inside the single cell. I was looking instead for the possibility to use more than one row, with different structure one from the others. This way you can write columns grouping headers, and obtain a nicer view.

How to handle decimal separators (e.g comma instead of dot) for l18n

Created 2 years ago by jpabloHow-tos2 comments – viewed 11,277 times – ( +2 ) – version 1.1
Yii i18n does not cover decimal format. Some languages like Spanish (I live in Argentina) uses comma ',' instead of dot '.' as decimal separator.

History Autocomplete

Created 2 years ago by zaccariaHow-tos2 comments – viewed 7,042 times – ( +3 ) – version 1.1
In application development we often have to choose how to mange recurrent values.
tags: autocomplete

Drop down list with enum values for column of type ENUM >+> incorporate into giix

Created 2 years ago by c@cbaHow-tos2 comments – viewed 23,061 times – ( +14 ) – version 1.1
Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue'). We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a drop down list, which has the enum values as options. The main code was contributed by zaccaria in the forum (see this post).

get summary of related model via STAT relation

Created 11 months ago by rootbearHow-tos2 comments – viewed 7,337 times – ( +6 / -1 ) – version 1.1
typical scenario: invoice, invoice items.

CGridView keep focus on the control after filtering

Created 2 years ago by jayalaHow-tos2 comments – viewed 7,435 times – ( +5 ) – version 1.1
You can find the reason why I wrote this article here.
tags: CGridView, filter

custom sql query results to CDetailView

Created 11 months ago by KonApazHow-tos2 comments – viewed 12,721 times – ( +3 )
This is a bried guide about displaying of custom sql query results.

How to include Javascript, CSS

Created 10 months ago by InterboyHow-tos2 comments – viewed 287,434 times – ( +7 / -2 ) – version 1.1
There are many methods that we can include javascript, css into your Yii App. Today I will demonstrate three simple and helpul methods.