Tag Archives: Postaday2011

Drupal – Add page.tpl.php for different Content Type

In Drupal, we can determine the template files of the page which is going to be rendered. Add the following code in your template.php.

...
function <theme>_preprocess_page(&$vars) {
  // Drupal 7
  print_r($vars['theme_hook_suggestions']); exit();

  // Drupal 6
  print_r($vars['template_files']); exit();
}
...

  Continue reading Drupal – Add page.tpl.php for different Content Type

Google – How to fix “This site may harm your computer”

If your website is marked as “This site may harm your computer” by Google, most likely your site is hacked. In that case, log in to Google Webmaster Tools and it will shows you which URLs are “infected”. This should help a lot to clean the malware.

So make sure you have configured Google Webmaster Tools for your live websites. Continue reading Google – How to fix “This site may harm your computer”

Drupal – Sharing data across fields in the same row with Views Custom Field

We have talked about the Views Custom Field module previously. If you have no idea what is it for, you can take a look @ Drupal – Custom PHP code for Views Field.

Sometimes we may need to get a full node using Views Custom Field. For example, i want to get the number of images of a node. Continue reading Drupal – Sharing data across fields in the same row with Views Custom Field