Drupal 7

  • Add Honeypot to Simplenews subscription form block

    The Drupal Honeypot module (https://drupal.org/project/honeypot) works well out of the box for comments and web forms in nodes. In my case i needed to add the Honeypot spam filter to a Simplenews (https://drupal.org/project/simplenews) newsletter subscription form, which resides inside a block in the sidebar of most pages. The problem here was that if the time restriction feature…

    Read More

  • Improve your Drupal theme markup with body classes

    Since Drupal 6, a lot of the detailed markup as found in the excellent Zen theme framework has made its way into the default Drupal markup. More details about this feature can be found here https://drupal.org/node/163723 To use this feature for your theme just insert the variable $body_classes into your tpl files body opening tag…

    Read More

  • How to create and use a Drupal template (tpl) file

    Template files are used to overwrite the core Drupal output (or the output of a module that overwrites the core Drupal output). This can be for example useful if the layout of a particular content type, page, block or view can’t be easily fixed by a stylesheet. With a tpl file you can completely overwrite…

    Read More