3/12/2013 in Drupal by micah
This example shows how to generate a render array from an array of data that includes a pager. This example will theme the content as an item_list, but the content section could be parsed and rendered as a table or by any other means, depending on the content of the $rows array.
read more
1/12/2013 in Drupal by micah
This example takes the node creation date and renders it as a fake field. It also creates a theme_mysite_pseudo_field() function that could be used as a template for any renderable array.
read more
12/20/2012 in Drupal by micah
Drupal 7 contains some incredibly powerful functionality in things like Render Arrays, Entity and Field APIs, etc. However, the actual details of these things are next to impossible to find. Especially difficult are specific examples and lists of available options. The more time I spend developing in Drupal 7, the more time I spend digging through code that I've already written trying to find a snippet that took me hours to find or figure out the first time I used it. I'm starting a short series of posts to document these items so I can find them more quickly.
read more
12/8/2012 in Drupal by micah
I've had a couple of cases recently where I've wanted to use views to override the output of taxonomy/term/%taxonomy_term on a site, but this can be tricky if you want to use different views for one or more specific vocabularies. Normally, you'd just enable the delivered Taxonomy Term view and modify it as needed for the site, and presumably that's how Drupal 8 will work by default with Views in Core. I've looked briefly at the Taxonomy Views Integrator module, but quite frankly, this task falls under customization for a specific site, so why not just customize for the site?
read more
12/8/2012 in Drupal by micah
The default behavior when rendering images in Drupal 7 is to include the height and width tags on images. This causes problems for responsive design, where we want to set these attributes in css, if at all. There's a historic reason why Drupal 7 includes these tags by default. It was removed at one point, and put back in, although I can't find the actual issue numbers right now.
The good news is that it's fairly easy to change this behavior with a custom theme function, leaving the rest of the image data intact.
read more
8/19/2011 in Life Online by micah
I just read The five year lag, a good post about church and technology by @wezlo. While this wasn't his main point, a bit of what he said jumped out at me because it's been on my mind this week. I had to move back a couple of paragraphs to find the connecting statement, because - honestly - I'd skimmed right past it.
read more
8/8/2011 in Drupal by micah
I just finished taking the State of Drupal 2011 survey, and if you use Drupal in any way, you should, too. I thought I'd share some of my responses here, where I can also expand on them without getting too long-winded for a survey.
Drupal core provides stability. Drupal contrib provides agility. Core development should focus on building a well-written, reliable, secure platform with critical APIs that everyone can use. Contrib can extend core in many directions. Distributions, install profiles, and - more importantly - good cookbooks and tutorials can alleviate potential confusion about what contrib modules can work together to build great sites.
read more
3/23/2011 in Life Online by micah
The success of a website is often measured by how frequently users do what you want them to do. A lot of UX design effort goes into making it easy for them to do things right, but how often do we design so that users can do no wrong? This morning, I discovered that Kroger has applied this principle in a very effective way.
read more
1/6/2011 in Drupal by micah
It may seem odd that I spent Drupal 7 release day installing Drupal on a Microsoft server platform, but that's what I did. Honestly, the timing was coincidental. One of my current projects has been to stage up a new Windows 2008 Server to replace an aged Windows 2000 web server, and yesterday just happened to be the day that all of the pieces fell together.
The existing server runs Classic ASP code that talks to both SQL Server and Oracle, sometimes on the same page, and can export data to MySQL via DTS packages through an ODBC connection. There are also a few existing PHP pages in the mix, so the original server is complete soup. The long term goal is to migrate the site to Drupal, but some of the ASP back-end code is so specialized that the only way it will get migrated is to write it as custom PHP code usng Drupal APIs.
read more
10/8/2010 in Life Online by micah
I was recently asked about using issuu.com as a tool for publishing print media on the web. While I found only a couple of minor things I didn't like about Issuu, mostly regarding zoom control, this question roused my general dislike for the practice of dumping printed material to a PDF file and slapping it on a website.
read more