Drupal theming

Use an svg logo

This is a simplified example!

In your template file use the following code to set up the logo.

Template files for specific view modes

Add this to your theme template.php file.

 * adds templates for teasers
 * @param string $vars
function MYTHEME_preprocess_node(&$vars) {
  if ($vars['view_mode'] == 'teaser') {
    $vars['theme_hook_suggestions'][] = 'node__' . $vars['node']->type . '__teaser';

Now you can add a regular template file like node--basic-page--teaser.tpl.php to the templates of your theme. Just make sure the fields you want to use in your template are available in the view mode of the content type.

Subscribe to RSS - Drupal theming