Wiki

Sorted by viewsX
Displaying 341-350 of 738 result(s).

pass variables or content block from view file to layout file

Created 2 years ago by yiqing95How-tos0 comments – viewed 15,117 times – ( +2 ) – version 1.1
If you use yiic to generate webApplication there will be a layout folder under the protected/views/, and the Controller class under protected/components which will use by default these layouts files.

Multilanguage and SEO friendly

Created about a year ago by InterboyHow-tos1 comment – viewed 15,110 times – ( +5 ) – version 1.1
In your application configuration (protected/config/main.php), set the sourceLanguage parameter to English:

TDD with PHPUnit_Story and Yii

Created 3 years ago by sidewinderTutorials1 comment – viewed 14,932 times – ( +7 ) – version 1.1
Unfortunately Sebastian Bergmann decided to remove PHPUnit_Story from future PHPUnit versions. Thanks to elvan for pointing me to the relevant comment. As an alternative Behat has been suggested but it seems too bloated for me TBH. There is also PHPSpec but it's non flexible enough for me and tightly bound with English language (What's the purpose of using DSL if customers can't speak English). Since both frameworks are quite young I think I'll just stick to PHPUnit and see what's going on on the BDD frameworks arena. Even PHPUnit_Story parts of this entry are going to be deprecated soon, rest is still valid! When doing TDD, please write tests with design and behaviour of application in mind instead of testing single functions.

Activate captcha after unsuccessful login attempts

Created about a year ago by Kostas Apazidis (KonApaz)How-tos21 comments – viewed 14,857 times – ( +11 / -1 ) – version 1.1
Like gmail, if you have tree or more unsuccessful login attemps a captcha appears

Yiinitializr: The Library

Created about a year ago by Antonio RamirezOthers9 comments – viewed 14,798 times – ( +15 ) – version 1.1
Introduction

How to call a default layout for every module and how to work <php echo $content; ?>

Created about a year ago by Ankit ModiTips0 comments – viewed 14,781 times – ( -2 )
Hi Friends, Hi Friends, Some common question is difficult to how to create the layout on yii and how to work

Radio Button List with enum values for column of type ENUM >+> incorporate into giix

Created 2 years ago by pckabeerHow-tos1 comment – viewed 14,721 times – ( +7 ) – version 1.1
Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue'). We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a Radio Button List, which has the enum values as options. This is a rewrite of c@cba in the wiki article of enumDropdownListThe main code was contributed by zaccaria in the forum (see this post).

Logout CSRF Protection

Created 3 years ago by Rodrigo CoelhoTutorials1 comment – viewed 14,646 times – ( +10 ) – version 1.1
CSRF is the acronymn for Cross-site request forgery. It is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated.

Twitter Bootstrap style Breadcrumbs

Created 2 years ago by junaidatariHow-tos0 comments – viewed 14,611 times – ( +5 / -1 ) – version 1.1
1: Create breadcrumb in your view file.

How to use GridView with AJAX

Created 11 months ago by Antonio RamirezHow-tos2 comments – viewed 14,563 times – ( +11 ) – version 2.0
With the adoption of PJax on Yii2 things  have change quite a bit with GridView when it comes to work with them in AJAX mode. It will probably be confusing at the beginning, but then you will soon realize how powerful the new approach is.
tags: yii2, pjax, widget