Project

General

Profile

Enhancement #126

DDB CMS version string in a custom header tag (meta generator probably)

Added by Anonymous over 5 years ago. Updated almost 4 years ago.

Status:
Open (waiting)
Priority:
Low
Assignee:
Estimated time:
URL med eksempel:
Kategorier:

Description

It would be useful as a form of sanity check on deployed instances of DDB CMS to ctrl-u and quickly check what version of DDB CMS a site is on, especially given that one of our objectives is fragmentation amelioration.

Are there any drawbacks I'm not noticing to having such a meta tag?

History

#1 Updated by Rolf Madsen over 5 years ago

  • Status changed from New to Open (waiting)
  • Priority changed from Normal to Low

#2 Updated by Martin Cording over 5 years ago

This is how we do it in our .profile-file, simply by fetching the version defined our .info-file.

/**
 * Implements hook_html_head_alter().
 * Adds Artesis version to 'generator' meta tag.
 */
function artesis_html_head_alter(&$vars) {
  // This call returns statically-cached data with no performance impact.
  $modules = system_list('module_enabled');
  $artesis_info = $modules['artesis'];
  $info = $artesis_info->info['name'] . ' ' . $artesis_info->info['version'];
  if (isset($vars['system_meta_generator']['#attributes']['content'])) {
   $vars['system_meta_generator']['#attributes']['content'] .= '; ' . $info;
  }
  else {
    // Trying to recreate meta tag.
    $vars['system_meta_generator'] = array(
      '#type' => 'html_tag',
      '#tag' => 'meta',
      '#attributes' => array('http-equiv' => 'Generator', 'content' => $info),
      );
  }
}

#3 Updated by Rolf Madsen about 5 years ago

  • Target version changed from Platform Backlog to Lokal eller projektudvikling udenfor vedligeholdsopgaven

#4 Updated by Rolf Madsen almost 4 years ago

  • Target version changed from Lokal eller projektudvikling udenfor vedligeholdsopgaven to DDB CMS - Analyse og prioritering udestår

Also available in: Atom PDF