destination link to parent

Experimental project

This is a sandbox project, which contains experimental code for developer use only.

This module add an extra link to a node's links. The link "Go back" appearing in node's page points back to the destination query variable set by its previous page's URL (ex. nodes listing page).

For example, if you setup a view with custom field link (views_customfield module required) as

<?php 
  $dest = array('query' => 'destination='.drupal_get_path_alias($_GET['q']), 'attributes' => array('class' => 'small btn'));
  print l('view', 'node/'.$data->nid, $dest);
?>

You can have an extra link setup for going back to this view from each listed item's page.

Project information

  • Created by windmaomao on , updated