drupal

Theme images in Drupal 7 - The new imagecache is image styles

ImageCache was the Drupal 6 way of doing things when you wanted a modified version of an already existing image on the site. Instead of manually manipulating the image and keeping a copy of it manually, you could setup an ImageCache preset which would be used to manipulate the image automatically.

In Drupal 7, this functionality is now in the core and it has also gone through some subtle changes to keep up with changes in the core.

Set and Get Drupal cache data

Drupal has an inbuilt caching system, but it needs to be used effectively to get any benefit from it. For data accessed many times during the same request, data should be statically cached. If it's consistent over a longer period of time, it should also be added to the core cache.

The following is my template code that I used any time I need to pull something from the cache. I modify it based on what I expect to happen to the data.

Separating out form_alter functions in Drupal 7 modules

Separate out files ... reduce code loaded for most pages since main module files are loaded for every page load. Moving all code that isn't needed on every page load to different files speeds things up. Maybe. It sounds good in theory.

To make Drupal search for the default form_alter, and any other custom form, the module needs to hook_hook_info_alter().

Pages

Subscribe to RSS - drupal