You are here

drupal

Theming Node Teaser

Include in the template.php file this function:

function THEMENAME_preprocess_node (&$variables) {
$variables['theme_hook_suggestions'][] = 'node__' . $variables['type'] . '__' . $variables['view_mode'];
}

Now the node--CONTENTTYPE--teaser.php works!

Add viewport meta to template.php

Find this function:

function my_theme_preprocess_html(&$variables)

and insert this code at the end. If the function does not exist, please, create it.

$viewport = array(
'#tag' => 'meta',
'#attributes' => array(
'name' => 'viewport',
'content' => 'width=device-width, initial-scale=1, maximum-scale=1',
),
);
drupal_add_html_head($viewport, 'viewport');
}

How install drush on Cpanel

Log into your cPanel hosting account via SSH. Make sure SSH is enabled for your IP before connecting.
Once logged in, make sure you are in the home directory of your hosting account.

From your home directory, use the wget command to get the newest version of Drush.

wget https://github.com/drush-ops/drush/archive/master.zip

Unzip the drush file archive by using the following command

unzip -q master.zip

Rename this directory to simply be 'drush', by using the following command:

Pages