customization in search

this is my code:


<?php

/* @var $this BloggerController */

/* @var $model Blogger */


$this->breadcrumbs=array(

	'Bloggers'=>array('index'),

	'Blogger',

);

Yii::app()->clientScript->registerScript('search', "

$('.search-button').click(function(){

	$('.search-form').toggle();

	return false;

});

$('.search-form form').submit(function(){

	$('#blogger-grid').yiiGridView('update', {

		data: $(this).serialize()

	});

	return false;

});

");

?>


<h1>Bloggers</h1>


<?php echo CHtml::link('Search','#',array('class'=>'search-button')); ?>

<div class="search-form" style="display:none">

<?php $this->renderPartial('_search',array(

	'model'=>$model,

)); ?>

</div><!-- search-form -->


<?php $this->widget('bootstrap.widgets.TbGridView', array(

	'id'=>'blogger-grid',

	'dataProvider'=>$model->search(),

	

	'columns'=>array(

		'blogger_name',

		'blog_name' ,

		'email',

		'rating',

		'city',

		'state',

		'country',

		'status',

		'contract_status',

		array(

			'class'=>'CButtonColumn',

		),

	),

)); ?>



I have link to search :


<?php echo CHtml::link('Search','#',array('class'=>'search-button')); ?>

but i want that search option directly on page i dont want link how can i do that.

second one i want link on active record for example if i click on blogger name his page should open.how can i gave the link.

  1. this link is just triggering show() for search form it’s on page already.

  2. instead of just '‘blogger_name’, U have to to something like:

    [

    'name' =&gt; 'blogger_name',
    
    
    'type' =&gt; 'raw',
    
    
    'value' =&gt; '&lt;a href=&quot;Yii::app()-&gt;createUrl(blogger_url)&quot;&gt;&#036;data-&gt;blogger_name&lt;/a&gt;'
    

    ]

please check this

http://www.yiiframework.com/doc/api/1.1/CGridView

Thank You

I understand the 2nd.

But in first i dont want that link.

I just want to show that page which is on link.

this is container for search form, just remove "style="display:none;".

Than it will be shown on page, and after U can remove link;

<div class="search-form" style="display:none">

<?php $this->renderPartial(’_search’,array(

    'model'=&gt;&#036;model,

)); ?>

</div><!-- search-form -->

very very thank you

But sorry

2nd problem is not solving i want to give link in blogger name for example blogger name is amitesh if i click on amitesh it will open amitesh profile.

I get it its working thank you very much