How to theme admin block content in drupal


One of the most common issues in Drupal is admin page themeing, below pages theme of being some complicated, we have found the best solutions for that, so don't worry about Drupal admin page themeing

Here is the code

Add below code in your template.php file

function your_theme_admin_block_content($variables) { 
  $content = $variables['content'];
  $output = ''; 
  if (!empty($content)) {
    $class = 'admin-lists';
    if ($compact = system_admin_compact_mode()) {
      $class .= ' compact';
    }
    $output .= '<div class="' . $class . '">';
    foreach ($content as $item) {
 $output .= '<div class="admin-extra"><div class="insidewrps">';
      $output .= l($item['title'], $item['href'], $item['localized_options']);
      if (!$compact && isset($item['description'])) {
        $output .= '<span>' . filter_xss_admin($item['description']) . '</span>';
      }
 $output .= '</div></div>';
    }
    $output .= '</div>';
  }
  return $output;
}

After adding the above code in your template.php file clear your drupal cache and check again, the above code for admin/structure, admin/config like pages 

Related Post


Latest Post


Recent Posts Widget

Make sure to never miss a thing...

Get the latest news from the creative industry along with other creative goodies, conveniently delivered to social media.