When it comes to providing custom view modes for entities in Drupal, most developers turn immediately to Display Suite or Entity View Modes. Display Suite is very powerful, but I've found it to be far too "heavy" for most of my use cases. In this case, by "heavy" I mean that the module does way more than I need it to. It does a lot of things I simply don't want on my site. Entity view modes is a lighter-weight approach to supplying additional view modes, but I found that even it was cumbersome when it came to managing my view mode configuration in an easily-deployable way.
I wanted a simpler solution, and I knew it couldn't be that hard to provide this functionality in a custom, streamlined module.
The code snippets below do the following:
- Define new display modes. As you'll see, this is super easy to do in code.
- Suggest node templates based on the view mode of the given node. e.g. a teaser template vs. a full display template.
- Suggest page templates based on the node type being viewed. e.g. alter the page markup for Article nodes.
This is a collection of notes I took while setting up a Drupal-ready Apache / MySQL / PHP environment on OS X using Homebrew and PEAR / PECL. I believe it should work to recreate an environment from scratch, but I've not run through the notes from start to finish on a fresh environment to validate. Hopefully this will help you get your own environment up and running easily!
Note: Mark Sonnabaum's Megalodon might be of interest to you, as well. For me, it involved learning a few too many things, and I also wanted as much as possible in my environment to be handled via a package manager like Homebrew or PEAR.
Update: Per Mark, Megalodon does entirely use Homebrew and Chef, I just misunderstood it. I look forward to seeing what I can do with it, once I dig in and understand it a bit more.
Update: Thanks, @stevepurkiss, for pointing out the typo on the first line for
brew tap... That's been fixed!
Update: Thanks, @cashwilliams, for pointing out some issues with the my.cnf and order of packages being installed. I've updated a couple of the instructions below to reflect his findings.
Update: I've added instructions for initial setup of Drupal coding standards for PHP Code Sniffer.
Just over 6 years ago I joined ASU's University Technology Office as a young and admittedly very inexperienced developer. I was fortunate enough to spend the time since then working for folks with foresight and strategic vision that I've only recently started to appreciate. I've also been blessed to have been involved with projects that I feel proud to say are changing the face of education. In short, I've loved my work at ASU more than my clumsy writing can describe here.
A development virtual machine can be really handy. It gives you a sandbox of sorts where you can feel free to test and experiment knowing that in a worst-case scenario you can just delete the VM and start over. It can also be a great way to practice server configurations and sketch out "real-world" server setups. Here's the process I follow to setup my Ubuntu 10.04 LTS Drupal development VM in VirtualBox. Aside from the VM-specific steps, these instructions should work for a regular Ubuntu server (VM or not).
This spring, I wrapped up my masters degree in Educational Technology at Arizona State University. In my studies, I had the great pleasure of working with some of the trailblazing academics in the field of educational language, literacy, and gaming studies. Among the folks I've interacted with over the last several years, James Paul Gee and Elisabeth Hayes have overwhelmingly influenced my interests in academic research in the field. Guided by their seminars and publications, along with many others, including Sean Duncan and Constance Steinkuehler, I developed a strong interest in utilizing my web application development skills to create tools that further the field of academic research in language and literacy.
Last fall, I started in earnest on a project to do just that and, to make a long story very short, the ultimate result is Decoder Ring, which I've just presented at the 2010 Games, Learning & Society Conference. Decoder Ring is a web-based, collaborative language analysis tool designed for academic research of textual content. It features:
- Abstracted, flexible, powerful data model
- Sustainable, low cost, open source framework
- Project- and group-based to facilitate collaboration
- Tools for gathering (scraping), importing, browsing, and exporting large data sets
- Automated and extensible reporting tools
I recently presented a session titled Case Studies in Academia: Drupal at ASU & Johns Hopkins Knowledge for Health at DrupalCon San Francisco 2010. The presentation went really well. It was great to meet with all the other universities that are using Drupal and talk about the wildly varying ways Drupal is being used in academia.
I've hated my personal site's theme for a couple of years now. Cleaning it up has been sitting a few items down on my todo list for a long time, and I finally decided to stop waiting for a good time and just move it up the stack this week.
[Update] I've updated the handout to be a single page, cleaned-up a lot of the instruction, and fixed several typos. Please see the revised handout below.
An additional note: If you use the handout to assist your site upgrade process, please do me a favor and fill out a brief survey.