Wiki

Sorted by ratingX
Displaying 171-180 of 750 result(s).

Adding search to Yii blog example (using Zend Lucene)

Created 3 years ago by dckurushinTutorials21 comments – viewed 64,665 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.

Special $variables in CGridView and CListView

Created 3 years ago by Steve FriedlTips11 comments – viewed 50,603 times – ( +27 / -2 ) – 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.

Overcoming removal of client helpers (e.g. ajaxLink) and ClientScript in Yii 2.0

Created about a year ago by Kartik VFAQs1 comment – viewed 10,517 times – ( +38 / -4 ) – version 2.0
With Yii Framework 2.0, one of the many changes, that Yii 1.x developers will face is removal of all client helpers and revamp of the CClientScript functionality. For example no more CHtml::ajaxLink or Html::ajaxLink. How do you cater to such requirements in Yii 2.0?

How to store array/widget configuration to the database with config validation rules

Created about a year ago by Kartik VTutorials0 comments – viewed 3,524 times – ( +38 / -4 ) – version 2.0
You may have scenarios, where you want to store a specific array configuration to the database. A classic example could be saving Yii widget configuration to the database and then retrieving it at runtime, with dynamic parameters set. This wiki discusses one of the approaches to do this. Let's consider you have something like the NavBar configuration below to store in the db:

Filter & Sort by Summary Data in GridView Yii 2.0

Created about a year ago by Kartik VTutorials6 comments – viewed 12,865 times – ( +38 / -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.

Override/Eliminate Bootstrap CSS/JS for Yii 2.0 widgets

Created about a year ago by Kartik VHow-tos2 comments – viewed 12,764 times – ( +37 / -4 ) – 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:

Locking your Yii 2 project package versions with composer.lock

Created about a year ago by Kartik VTips0 comments – viewed 2,409 times – ( +37 / -4 ) – version 2.0
Ok, you have installed a Yii 2 basic or advanced app for the first time and completed the post install steps. You have picked up a few extensions to install for the first time as well. You would already see a composer.lock file in your application root folder.

Yii 2 list of path aliases available with default basic and advanced app.

Created about a year ago by Kartik VTips1 comment – viewed 19,225 times – ( +42 / -5 ) – version 2.0
If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes. But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.

How to create a breadcrumb widget

Created 6 years ago by knutTutorials4 comments – viewed 61,867 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 5 years ago by Y!!Tutorials4 comments – viewed 34,196 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.