Articles in category "tutorials", sorted by viewsX
Displaying 81-90 of 243 result(s).

Simplified meta tags

Created 6 years ago by Y!!Tutorials5 comments – viewed 36,655 times – ( +13 ) – version 1.1
If we want to set meta tags on a per page (controller-action) basis, we may use the clientScript application component.

Multiple Databases and Multiple Domains

Created 5 years ago by got 2 doodleTutorials2 comments – viewed 35,905 times – ( +15 / -2 ) – version 1.1
Add these lines in /config/main.php
tags: database

To configure Yii path in Windows platform

Created 4 years ago by CodaTutorials2 comments – viewed 35,595 times – ( +3 / -6 ) – version 1.1
I can see many questions regarding configuring the path using Windows OS. I could hardly get the right information about it. The cook book has defined for Linux. So I would like to share my idea on it. To configure the Yii path using Windows OS,

Manage application configuration in different modes

Created 6 years ago by qiangTutorials5 comments – viewed 34,518 times – ( +17 ) – version 1.1
Info: This tutorial references the idea presented in Jonah's excellent blog article.

Adding login form to each page

Created 6 years ago by pestaaTutorials5 comments – viewed 34,460 times – ( +3 / -2 ) – version 1.1
After adding proper form to the main layout, like:

Setting application parameters dynamically in the back-end

Created 3 years ago by PablovpTutorials6 comments – viewed 34,179 times – ( +13 / -1 ) – version 1.1
I was wondering how to set-up the application parameters in the back-end to use them all around the application without the need of using the database and I came up with this solution, I hope it helps somebody else.

Simple access control

Created 3 years ago by szfjozsefTutorials4 comments – viewed 34,166 times – ( +4 / -8 ) – version 1.1
For those who feel, the Controller->accessRules() or RBAC (Role-Based Access Control) is too complicated or doesn't want the username(s) to be hard-coded in accessRules(), here is a very simple, easy-to-implement solution.

Add information to Yii::app()->user by extending CWebUser (better version)

Created 5 years ago by emixTutorials5 comments – viewed 32,080 times – ( +5 / -1 ) – version 1.1
I found a better solution.
tags: Yii, user, rbac

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

Created 3 years ago by c@cbaTutorials10 comments – viewed 31,977 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.

Events explained

Created 3 years ago by pligorTutorials9 comments – viewed 31,335 times – ( +22 / -3 ) – version 1.1
Let's see what exactly are the events in Yii!