Wiki

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

Accessing data in a join table with the related models

Created 5 years ago by fsbHow-tos8 comments – viewed 109,756 times – ( +28 / -2 ) – 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 178,962 times – ( +28 / -2 ) – 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.

Using Yii with PHP 5.4 built-in webserver instead of Apache

Created 5 years ago by samdarkHow-tos1 comment – viewed 13,398 times – ( +21 / -1 ) – version 1.1
Since version 5.4 PHP can work as a simple webserver so you can develop Yii applications without installing Apache. That's how to use it:

Dynamic Sidebar using CClipWidget

Created 6 years ago by SheldmanduHow-tos5 comments – viewed 27,597 times – ( +21 / -1 ) – 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 4 years ago by drumaddictHow-tos15 comments – viewed 83,013 times – ( +21 / -1 ) – version 1.1
AngularJS Frontend:Connecting it with a Yii Backend REST API.Gallery Manager Demo Application.

Implementing cron jobs with Yii

Created 6 years ago by samdarkHow-tos6 comments – viewed 81,145 times – ( +33 / -3 ) – version 1.1
There are two ways to run a cron job:
tags: cron, cli

How to set up Unicode

Created 8 years ago by MikeHow-tos10 comments – viewed 94,091 times – ( +19 / -1 ) – 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 5 years ago by dhampikHow-tos5 comments – viewed 38,370 times – ( +19 / -1 ) – 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 24,199 times – ( +19 / -1 ) – 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 53,968 times – ( +19 / -1 ) – 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.