[Drupal] Simple way of theming views

| | 1 min read

In Drupal creating a custom theme and enabling the same enhance Drupal's core look and feel.
But the enhancement feel could be further brought by theming each views in the Drupal site.
Follow the theming steps to make changes in your Drupal content views.

  • Select a default theme from sites/all/themes.
  • Rename the theme name.For example, if you have selected bartik theme and rename it as theme_bartik2.
  • Change the info file in the theme and give stylesheets[all][]=css/theme_bartik.css.
  • Create theme_bartik.css in the sites/all/themes/css folder
  • Edit the template.php and rename the new theme names to the functions.
  • Enable the theme from appearances.
  • Now enter the view setting.Select the area where you want to make the change.
  • For example select title from content and click the title settings.
  • In the style settings->customised field->Edit the HTML element as your wish and write a css class.
  • You can view the css class in the html code.
  • Provide your css style for the class in theme_bartik.css .

In this format a customised theme of our wish for any Drupal view could be created.