Drupal Theming, JQuery, Site Building & Front End Web Development » Danny Englander
Drupal Planet
A few months ago, I became a full Drupal contributor on drupal.org with my theme Bamboo. I have to say that contributing to Drupal has been an eye opening experience and extremely rewarding.
In my last article I demonstrated how to extract basic data from field array elements which is ideal for custom node theming. The key to this is using *field_get_items*. I'll expand upon that by adding in additional Drupal API functions to enhance and format these Field array elements.
In this article, I'll show how to really dig into data associated with a field and for that I'll use a preprocess function in your theme's template.php for the logic and then a variable for presentation in a custom node template.
I've been using MAMP Pro for some years now for my local Drupal development environment in Mac OS X. The prospect of MAMP is alluring, it promises point and click creation of website environments locally on your Mac with database, Apache and all.
I've been playing around with Drupal 7 Multi-sites lately on my local development environment and was trying to figure out how to add a multisite to git.
The more Drupal web projects I do, the more I keep having to solve similar issues that arise during development or reusing similar code snippets. Typically you can use Features or write a small module for a lot of things but sometimes, you just need that one code snippet or quick fix.
I was recently tasked with theming a customized user login page in Drupal 7. I could not find a whole lot of documentation for this so the first place I looked was in the core modules folder hoping to find something like user--login.tpl.php that I would be able to copy and put in my theme folder for an override.
The Drupal 7 Account pages (user, user/register, user/password), all have the same Title, i.e. "User Account". I just ran up against this issue and my client wanted different / custom titles on these pages.
I recently built my new photo portfolio site High Rock Photo and on single image gallery pages (a Content Type I created), I wanted to show "related" images that were in the same category, images that were tagged with the same taxonomy term.
I often see posts on the drupal.org forums and elsewhere in regard to implementing jQuery scripts and code into Drupal. It seems common that users try to attach JQuery right within page.tpl.php or html.tpl.php. In other words, it's hard-coding a script into a page and it's not ideal. Some try to render it using the PHP filter within a block or node.