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 113,223 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 6 years ago by HermansHow-tos16 comments – viewed 188,649 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,806 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 28,063 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 84,874 times – ( +21 / -1 ) – version 1.1
AngularJS Frontend:Connecting it with a Yii Backend REST API.Gallery Manager Demo Application.

How to set up Unicode

Created 8 years ago by MikeHow-tos10 comments – viewed 96,376 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 40,636 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 25,047 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 55,145 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.

Override/Eliminate Bootstrap CSS/JS for Yii 2.0 widgets

Created 3 years ago by Kartik VHow-tos2 comments – viewed 32,842 times – ( +38 / -5 ) – 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: