I'm working with a Yii ajaxLink:
echo CHtml::ajaxLink(
'Toggle',
Yii::app()->createUrl('Tweet/toggleTag'),
array(
'type' => 'POST',
...
'data' => array('tagID'=>$data->tagID)
...
What I want to do is make the link toggle the tag (client and server side). I have a class that marks the element, but I'm not sure how to get access to that and pass it to the data parameter via Yii.
The link gets a 'hasTag' class when it has a tag.
I could just check if the tag is enabled on the server, but that doesn't seem like the right answer to me.
How can I toggle the tag based on its client side state?