Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 111-120 of 352 result(s).

Using a CDbDataReader (sql query result) in a zii widget (such as CGridView or CListView)

Created 4 years ago by Revelis Luc BonninHow-tos2 comments – viewed 26,391 times – ( +9 / -1 ) – version 1.1
If in your application you have to proceed to a complex SQL query that is not associated to a model, you will use CDbDataReader like it is described in the Yii documentation. An example could be

Dynamic Sidebar using CClipWidget

Created 5 years ago by SheldmanduHow-tos5 comments – viewed 26,364 times – ( +21 ) – version 1.1
Most applications will have one or two sidebars and often you want to control the content that should appear in the sidebar based on the action. For example you will want to show something different on the homepage as opposed to some view page. While achieving this you generally also want to avoid putting the layout into each view, as that would mean if you wanted to change the layout (e.g. put the sidebar on the left instead of the right or do some funky layout which requires an additional div tag to be added) you'd have to go through every view, which does not achieve good code re-use. It is also bad practice to have lots of if statements in column2 layout just so that you can generate the sidebar correctly.

CGridView keep state of page and sort.

Created 4 years ago by DanielHow-tos5 comments – viewed 26,151 times – ( +6 ) – version 1.1
Remember-filters-gridview is one of the must-use extension on all of my project. However, it lacks of storing the page and sort variables of the grid view.

Include Yii framework in a Joomla module

Created 5 years ago by zaccariaHow-tos8 comments – viewed 25,980 times – ( +8 / -2 ) – version 1.1
Delploying anything using joomla's framework is quite difficult. The framework don't provide a good MVC structure and the documentation is very poor.

how to make a dynamic progress bar to show the percentage or status

Created 3 years ago by hehbhehbHow-tos1 comment – viewed 25,752 times – ( +5 ) – version 1.1
Yii have a CJuiProgressBar, but it is static. If we want a dynamic progress bar to show the percentage or status, we have to do more things. I make it successfully and am glad to share it with you.

Override/Eliminate Bootstrap CSS/JS for Yii 2.0 widgets

Created 2 years ago by Kartik VHow-tos2 comments – viewed 25,633 times – ( +38 / -4 ) – version 2.0
In Yii 2.0, the yii widgets that use Twitter Bootstrap CSS & JS directly, are part of the yii2-bootstrap extension, starting with yii/bootstrap namespace. For customizing bootstrap extension specific widget assets, you could configure your own assets (CSS/JS) using the new Yii Asset Manager in your Yii Config file. Something like:

Yii User and Rights Implementation

Created 3 years ago by Rajith RHow-tos12 comments – viewed 25,461 times – ( +7 / -7 ) – version 1.1
implementing some features of yii user and rights.

Displaying uploaded file from DB for update with FileInput widget

Created 2 years ago by Kartik VHow-tos3 comments – viewed 25,184 times – ( +39 / -5 ) – version 2.0
This is for folks who are using \kartik\widgets\FileInput to upload files from your client. How do you display an image for update after you have uploaded it to the server using the widget?

Using loginRequiredAjaxResponse to solve ajax session timeout

Created 4 years ago by RutgerHow-tos3 comments – viewed 24,962 times – ( +13 ) – version 1.1
This solution requires Yii 1.1.9 or above

Run an Yii Application inside an Wordpress page

Created 5 years ago by Paul ApostolHow-tos3 comments – viewed 24,864 times – ( +12 ) – version 1.1
Install a Wordpress site (mine is in "http://localhost/test/wordpress")