Wiki

Articles in category "tutorials", sorted by ratingX
Displaying 71-80 of 249 result(s).

Using your own forked version of extensions with composer

Created 2 years ago by Kartik VTutorials3 comments – viewed 7,027 times – ( +39 / -4 ) – version 2.0
So you want to use a fork of any existing vendor extension with your Yii 2 install and use the fork, instead of original source. This does not need you to push any update or register your package on packagist.org. You are recommended to follow the approach below:

Filter & Sort by Summary Data in GridView Yii 2.0

Created 2 years ago by Kartik VTutorials6 comments – viewed 32,003 times – ( +39 / -4 ) – version 2.0
This wiki explains how to add summary data from related models into your Yii Framework 2.0 gridview with filtering and sorting by the summary columns.

Adding search to Yii blog example (using Zend Lucene)

Created 4 years ago by dckurushinTutorials21 comments – viewed 71,153 times – ( +33 / -3 ) – version 1.1
For this tutorial I will add a search to the blog demo. The search would be based on Zend Lucene.

How to create a breadcrumb widget

Created 7 years ago by knutTutorials4 comments – viewed 67,517 times – ( +13 ) – version 1.1
Here's a simple way to create a breadcrumb widget to be used in your templates. The idea is just to isolate how the breadcrumb is generated based on an array of crumbs.

Simplified meta tags

Created 6 years ago by Y!!Tutorials5 comments – viewed 39,294 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.

Handling tabular data loading and validation in Yii 2

Created 2 years ago by Kartik VTutorials6 comments – viewed 29,142 times – ( +44 / -6 ) – version 2.0
How do you read and handle tabular data submission via form in Yii framework 2.0? Sometimes we want to collect user input in a batch mode. That is, the user can enter the information for multiple model instances and submit them all at once. We call this tabular input because the input fields are often presented in an HTML table.

How to create/save more Model inputs and make them repeatable with jQuery

Created 7 years ago by qiangTutorials3 comments – viewed 38,717 times – ( +12 ) – version 1.1
This is the first real problem that I encountered using Yii, trying to make a Model input repeatable in the form, validate and save them.

i18n for your model in just 1 line

Created 6 years ago by mintaoTutorials0 comments – viewed 13,075 times – ( +12 ) – version 1.1
A simple trick to get the localized version of a model field is to add this little method to your models.
tags: i18n

What to do when composer fails to update your vendor packages?

Created 2 years ago by Kartik VTutorials0 comments – viewed 13,266 times – ( +38 / -5 ) – version 2.0
Have you faced some of these problems when using composer with your Yii 2 installation?

How to customize the error message of a validation rule

Created 7 years ago by qiangTutorials4 comments – viewed 88,567 times – ( +18 / -1 ) – version 1.1
Validators extending from CValidator all have a property named message. You can set this property in the corresponding validation rule to customize the error message. For example, the following validation rule uses an error message that is different from the default one: