Community Documentation

Redirect to the newly but moderated revision

Last updated August 22, 2008. Created by fago on December 27, 2007.
Log in to edit this page.

If one uses the revision moderation module and perhaps also cclinks für scheduled revision publishing it's useful to redirect to a newly created but moderated revision after creation.

This can be done with this configuration:

array (
  'cfg_40' =>
  array (
    '#type' => 'configuration',
    '#altered' => false,
    '#event' => 'node_update',
    '#label' => 'Redirect to created revision',
    '#active' => 1,
    '#module' => 'workflow-ng',
    0 =>
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_drupal_goto',
      '#settings' =>
      array (
        'path' => 'node/[node:nid]/revisions/[node:vid]/view',
        'path_args' =>
        array (
          0 => 'node',
        ),
        'query' => '',
        'query_args' =>
        array (
        ),
        'fragment' => '',
        'fragment_args' =>
        array (
        ),
        'force' => 0,
        'override' => 1,
      ),
      '#label' => 'Page redirect',
    ),
    1 =>
    array (
      '#type' => 'condition',
      '#name' => 'workflow_ng_condition_token_compare',
      '#settings' =>
      array (
        'text1' => '[node:revision_moderation]-[node:revision]',
        'text1_args' =>
        array (
          0 => 'node',
        ),
        'text2' => 'on-on',
        'text2_args' =>
        array (
        ),
        'regex' => 0,
      ),
      '#label' => 'moderated Content revision has been created',
    ),
    '#name' => 'cfg_40',
  ),
)

About this page

Drupal version
Drupal 5.x
Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.