Foreach Readmore

Hi i have foreeach that list all row now i want it to have a button for readmore that slidedown below…


you have to create two seperated actions (or better one with a parameter)

for example


function actionViewArticle($full=null) {





if ($isFull) echo $model->fullContent; else  $model->headContent;

echo CHtml::link('read more...',array('viewarticle',array('full'=>1)));

i’ve done like this in my view

	<font style="color:#0066FF"><b><?php echo CHtml::encode($data->topic); ?></b></font>



	echo CHtml::ajaxLink(











<div id="readcontent<?php echo $data->message_id;?>"></div><br/>

<div align="center"> <hr style="width:85%;"/></div>


when i click the button it calls the function that show bellow the content now the another problem it should slide up if i click again the button any help…


You can use javascript extensions to perform this no need to hit the server for sliding up and down. For example you can check the below url