Let us consider an example.
We have one controller TrialController.php in controller folder.
Then we have two views one.php and two.php in views/trial folder.
class TrialController extends Controller
// action one renders view one and displays the link.
public function actionOne()
public function actionTwo($id,$name)
//$id and $name are available inside the method.You can do whatever logic you can do with them
//Here we are just passing them to the view.
//You can also pass dynamic variable from form submission or database tables.
//Here CHtml::link calls CHtml::normalizeUrl and creates url from the second parameter.
echo "your id is :".$id;
echo "your name is :".$name;
I hope I helped a bit.