public function Controller_Edit($Sender) {
      $Sender->AddSideMenu('settings/tagging');
      $Sender->Title(T('Edit Tag'));
      $TagID = GetValue(1, $Sender->RequestArgs);

      // Set the model on the form.
      $TagModel = new TagModel;
      $Sender->Form->SetModel($TagModel);
      $Tag = $TagModel->GetID($TagID);
      $Sender->Form->SetData($Tag);

      // Make sure the form knows which item we are editing.
      $Sender->Form->AddHidden('TagID', $TagID);

      if ($Sender->Form->AuthenticatedPostBack()) {
         // Make sure the tag is valid
         $TagData = $Sender->Form->GetFormValue('Name');
         if (!TagModel::ValidateTag($TagData))
            $Sender->Form->AddError('@'.T('ValidateTag', 'Tags cannot contain commas.'));
         
         // Make sure that the tag name is not already in use.
         if ($TagModel->GetWhere(array('TagID <>' => $TagID, 'Name' => $TagData))->NumRows() > 0) {
            $Sender->SetData('MergeTagVisible', TRUE);
            if (!$Sender->Form->GetFormValue('MergeTag')) {
               $Sender->Form->AddError('The specified tag name is already in use.');
            }
         }
         
         if ($Sender->Form->Save())
            $Sender->InformMessage(T('Your changes have been saved.'));
      }

      $Sender->Render('addedit', '', 'plugins/Tagging');
   }