Redirect to the newly but moderated revision

Last modified: August 22, 2008 - 08:20

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',
  ),
)

 
 

Drupal is a registered trademark of Dries Buytaert.