Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 41-50 of 354 result(s).

Dynamic Sidebar using CClipWidget

Created 5 years ago by SheldmanduHow-tos5 comments – viewed 26,976 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.

AngularJS Frontend:Connecting it with a Yii Backend REST API.Gallery Manager Demo Application.

Created 3 years ago by drumaddictHow-tos15 comments – viewed 79,282 times – ( +21 ) – version 1.1
AngularJS Frontend:Connecting it with a Yii Backend REST API.Gallery Manager Demo Application.

How to use PHPExcel external library with Yii

Created 6 years ago by Antonio RamirezHow-tos14 comments – viewed 93,980 times – ( +30 / -1 ) – version 1.1
Trying to learn and help some other programmers to find their solutions on the Yii Forum (I think is a superb way to learn the framework), I was facing one challenge with an external library that a fellow programmer wanted to use -quite good indeed: PHPExcel. And what is PHPExcel?

How to set up Unicode

Created 7 years ago by MikeHow-tos10 comments – viewed 90,484 times – ( +19 ) – version 1.1
To fix issues with display of special language characters once and for all there's a solution: use Unicode UTF-8 everywhere. If everything is set up to use Unicode, you can use mostly every language in your application.
tags: i18n, unicode

AssetManager: clearing browser's cache on site update

Created 4 years ago by dhampikHow-tos5 comments – viewed 35,737 times – ( +19 ) – version 1.1
If you like the things to be short and clear, then you can skip right to a short summary of instructions at the end of this article.

Hyphenation of routes in URL management

Created 4 years ago by qiangHow-tos6 comments – viewed 23,050 times – ( +19 ) – version 1.1
In this article, we introduce an approach that allows automatic hyphenation of the route part in URLs.
tags: URL

Create custom button button with AJAX function in CGridView

Created 4 years ago by nkdHow-tos2 comments – viewed 52,015 times – ( +19 ) – version 1.1
CButtonColumn in CGridView can be customised to include user built buttons. To learn a great deal about including custom buttons, read this excellent wiki. This tutorial will show how to call an action from one custom button using AJAX instead of regular GET calls.

Accessing data in a join table with the related models

Created 5 years ago by fsbHow-tos8 comments – viewed 104,314 times – ( +28 / -1 ) – version 1.1
Sometimes the right place to store application data is in a join table. For example, movie viewers either like or don’t like the movies they watched.

Url: hide index.php

Created 5 years ago by HermansHow-tos16 comments – viewed 168,651 times – ( +28 / -1 ) – version 1.1
Maybe it looks simple, but some time ago I need some time to find a solution of this case. I finally got it, and I want to share that I also experienced such cases. So that it can make reference.

How to log and debug variables using CWebLogRoute

Created 5 years ago by Antonio RamirezHow-tos8 comments – viewed 62,524 times – ( +18 ) – version 1.1
I have seen a couple of articles about how to integrate external libraries to debug our PHP code (i.e. firePHP) but after you read this article you will realize that there is no need for such libraries when using Yii.
tags: Logging