Wiki articles tagged with "search"

Showing 1-14 of 14 items.

How to display Dependent drop-down value using ajax call with dynamically

Created 11 years ago by Ankit Modi Ankit Modi, updated 6 years ago by samdark samdark.

Hi Friends, In this tutorial I write a code display dependent drop-down value using ajax call.

1 1
6 followers
Viewed: 51 980 times
Version: 1.1
Category: Tutorials

Expert's model generation with Gii

Created 11 years ago by le_top le_top, updated 11 years ago by le_top le_top.

Efficient coding with Yii implies efficient use of the code generator. This article shares the personalised Gii templates that were built starting from the standard templates proposed by AweGen.

1 0
2 followers
Viewed: 18 629 times
Version: 1.1
Category: Tips

Search scenario (CGridView, etc.): avoid default values from database as search condition.

Created 11 years ago by le_top le_top, updated 11 years ago by le_top le_top.

Yii has a neat "trick" that will assign default values to new CActiveRecords. When performing a search() though, this is pretty annoying as they automatically apply as filter values.

1 0
2 followers
Viewed: 11 895 times
Version: 1.1
Category: Tips

How to create a criteria condition for a multiple value text search i.e a "LIKE IN"

Created 11 years ago by toph toph, updated 9 years ago by toph toph.

This is a shortcut for adding a text search for multiple values i.e.

0 0
5 followers
Viewed: 56 576 times
Version: 1.1
Category: How-tos

Take more control of CGridview and model searching (related model or another controller)

Created 11 years ago by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz), updated 11 years ago by CeBe CeBe.

Suppose you have an Application in Yii that manages hotels each one has many customers.

2 0
6 followers
Viewed: 44 713 times
Version: 1.1
Category: How-tos

Adding a date range search for CGridView the easy way

Created 12 years ago by mikewalen mikewalen, updated 11 years ago by mikewalen mikewalen.
  1. Create an Active Record Behavior that builds the criteria for the search() method and attach it to your model
  2. Modify the search() method of the model to merge the behavior's criteria in with the rest of the searchable attributes
  3. Modify the _search form view to add the date range inputs
6 0
11 followers
Viewed: 43 895 times
Version: 1.1
Category: Tips

Drills : Search by a HAS_MANY relation in Yii 1.1

Created 12 years ago by softark softark, updated 6 years ago by softark softark.

Sometimes we get lost trying to search by a HAS_MANY relation using CActiveRecord or CActiveDataProvider in Yii 1.1. This article is a series of drills that try to describe the practical techniques of searching by a HAS_MANY relation.

22 0
27 followers
Viewed: 80 547 times
Version: 1.1
Category: Tutorials

CGridView, CListView and CActiveDataProvider

Created 13 years ago by softark softark, updated 12 years ago by softark softark.

CGridView (or CListView) together with CActiveDataProvider is a very powerful combination of the built-in tools of Yii. But how do they work together to accomplish their fantastic functions? And what are you expected to do to use them and to customize their behaviors? This article explains the very basics of them.

26 0
33 followers
Viewed: 147 376 times
Version: 1.1
Category: Tutorials

Searching and Sorting by Count of Related Items in CGridView

Created 13 years ago by softark softark, updated 10 years ago by softark softark.

class Post extends CActiveRecord {

...

} ` When you list Authors in grid you would like to print the count of posts in column, allow sorting on this column and probably filtering by the count.

21 0
40 followers
Viewed: 61 736 times
Version: 1.1
Category: How-tos

Adding search to Yii blog example (using Zend Lucene)

Created 13 years ago by dckurushin dckurushin, updated 12 years ago by klammeraffe klammeraffe.
  • add under runtime directory, a new one call it search, it will be used for the index files that Zend Lucene will create. Make sure it is writable!
29 1
47 followers
Viewed: 91 040 times
Version: 1.1
Category: Tutorials

Filter / Search with CListView

Created 14 years ago by JohnPollard JohnPollard, updated 12 years ago by JohnPollard JohnPollard.

This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.

22 0
26 followers
Viewed: 57 084 times
Version: 1.1
Category: How-tos

Search method of a model for filters when using dates - unixtimestamp in database

Created 14 years ago by Mukke Mukke, updated 14 years ago by jwerner jwerner.

I ran into a problem and on irc we worked it out. Since there is a lack on information on filters in genral i thought i'd start sharing all my findings, might be usefull for other people.

10 0
11 followers
Viewed: 39 096 times
Version: 1.1
Category: Tips

Using standard filters in CGridView custom fields

Created 14 years ago by GOsha GOsha, updated 14 years ago by jwerner jwerner.

In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.
For example:
We have a record in a database with field switch having 0 or 1 values. After that we want a user to see on or off instead 1 or 0.
So we do the usual thing:

<?php $this->widget('zii.widgets.grid.CGridView', array(
//.....
array(
    'name'=>'...
14 0
16 followers
Viewed: 75 783 times
Version: 1.1
Category: How-tos

Adding Yii Search to Your Browser Search Box

Created 14 years ago by qiang qiang, updated 7 years ago by CeBe CeBe.

The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.

25 0
6 followers
Viewed: 67 267 times
Version: all
Category: Tips