Alter edit link behaviour in a view I am trying to change the URL of the node edit link for a specific view.
This is what I have done and it (almost) works:


created a file mymodule/views/mymodule.views.inc with the following code:



/**
 * Implements hook_views_data_alter().
 */
function kd_ari_views_data_alter(&$data) {
  module_load_include('inc', 'mymodule', 'views/views_handler_field_article_link_edit');
  $data['views_entity_node']['edit_node']['field']['handler'] = 'views_handler_field_article_link_edit';
}



created a second file mymodule/views/views_handler_field_article_link_edit.inc with the following code:



class views_handler_field_article_link_edit extends views_handler_field_node_link {

 function render_link($node, $values) {
   if (!node_access('update', $node)) {
     return;
   }
   $this->options['alter']['make_link'] = TRUE;
   $this->options['alter']['path'] = 'admin/mymodule/' . $node->nid;
   $text = !empty($this->options['text']) ? $this->options['text'] : t('edit');
   return $text;
 }
}


The problem is that the view displays the edit link only one time after I clear all caches... afterwards the display link is gone. Any tips would be highly appreciated.
Add Nid as field,
Set Label to Operation (or anything you want ), 
 in Rewrite results section


check Override the output of this field with custom text  and
enter Edit text.
check Output this field as a custom link and in the input box
enter  admin/mymodule/[nid] .


save the field and enjoy the power of views rewriting.