Wiki

Sorted by commentsX
Displaying 81-90 of 728 result(s).

Caching the config main.php

Created 3 years ago by dckurushinTutorials11 comments – viewed 12,124 times – ( +4 / -2 ) – version 1.1
The config long array included every time, and it's not cached at all!

How to hide /frontend/web in url addresses on apache

Created 4 months ago by raminiousHow-tos11 comments – viewed 29,573 times – ( +11 ) – version 2.0
There is an issue on Yii2 to redirecting / urls to /frontend/web. In other words we need a way to hidden /frontend/web from addresses. We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)

Special $variables in CGridView and CListView

Created 3 years ago by Steve FriedlTips11 comments – viewed 47,204 times – ( +26 / -1 ) – version 1.1
The popular CListView and CGridView widgets each take a data provider and iterate over each data object produced, calling the user's code to render each row one at a time, and most are familiar with the use of the $data variable to represent the current model object or array.

Relational Query - Lazy Loading and Eager Loading / with and together

Created about a year ago by softarkTutorials10 comments – viewed 20,590 times – ( +14 ) – version 1.1
It's well known that there are Lazy Loading approach and Eager Loading approach in the relational query. But it's important to note that you should distinguish 2 different modes in the Eager Loading in Yii 1.1.x.

How to set up Unicode

Created 5 years ago by MikeHow-tos10 comments – viewed 67,593 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

Model password confirmation field.

Created 3 years ago by twisted1919How-tos10 comments – viewed 53,269 times – ( +11 / -1 ) – version 1.1
I had some troubles with the password confirmation field for when adding updating user records, so i thought that i should share the way i got it working.

A very easy way to setup yiic on WAMP server (without extra windows settings)

Created about a year ago by Kostas Apazidis (KonApaz)Tutorials10 comments – viewed 23,122 times – ( +6 / -1 ) – version 1.1
Assuming that you have already install the wampserver on your windows.

Organize directories for applications with front-end and back-end

Created 5 years ago by qiangTutorials10 comments – viewed 64,486 times – ( +28 ) – version 1.1
Large applications are often divided into front-end and back-end (or even more ends) depending on the target user groups. The front-end should be used by common users, while the back-end mainly the administrators or staff members. The two ends usually have dramatically different appearance, even though they may share a lot of code underneath. In this tutorial, we describe a way of organizing directories of the code for both ends.

Manage (Target) Language in Multilingual Applications + A Language Selector Widget (i18n)

Created 3 years ago by c@cbaTutorials10 comments – viewed 28,662 times – ( +15 ) – version 1.1
In case of a multilingual application, one might consider it a reasonable approach to store the preferred language of the user in a session variable, and after that, every time a page is requested, to check this session variable and render the page in the indicated language. This tutorial shows a Yii-way of doing this. We implement an event handler for the onBeginRequest event; as the name of the event suggests, this event handler will be called at the beginning of each request, so its a good place to check whether a language is provided (via post, session or cookie) and set the application language accordingly. We also implement a simple Language-Selector Widget, which can render the language options as ajax-links or as a drop-down list.

Behaviors & events

Created 5 years ago by pestaaTutorials10 comments – viewed 98,108 times – ( +50 ) – version 1.1
These features provide endless possibilities and unbelievable flexibility, but as current documentation does not give more than a few examples, it might be difficult to fully understand their internals and requirements.