DOPE #2: Node Subpages
Today was my second Day of Personal Enrichment at Jackson River. DOPE days are sort of like Google's 20% time, where employees are encouraged to work on projects that interest them. We don't have the luxury of doing it one day a week, but we do spend a solid day on these projects when we can fit it in the schedule. I wrote about the first one back in May, when I did some work on the Simplenews Threaded Send module.
This time around, I spent the day upgrading the Node Subpages module for Drupal 7. I originally wrote this module for a client, and this past weekend I released a 6.x version (read the release announcement here). The short explanation is that this module allows admins to define subpages that should be available on every node of a given content type. These subpages can display either a text field from the node, or a View. This can be seen in action on the Drug Policy Alliance site: Issue nodes like that one have subpages such as Our Priorities, Resources, and Activist Toolkit. You can read more about the module functionality on the project page.
Thanks to the Coder Upgrade module, I had the basic functionality upgraded pretty quickly. The rest of the day was spent adding features and fixing little things that needed cleaning up. It now allows you to re-order subpages once they are created and displays all values for fields that allow multiple values (it was originally developed to display only the first value, since that was all we needed at the time). The re-ordering turned out to be a real pain in the butt. The documentation for drupal_add_tabledrag()
wasn't real easy to follow, but I was able to figure it out by comparing my code to theme_filter_admin_format_filter_order()
.
7.x-1.0-alpha1 is now available on the project page. It's in alpha for now only because this version has only been run on my local dev environment, and I'd like to get a few more eyes on it before tagging a stable release. Give it a spin and let me know what you think!
Comments
angielski szczecin (not verified)
Wed 6 Jun 2012, 7:41 pm
Permalink
language change
Hello,
I'm new to all this. I've been kind of struggling recently with a language change in drupal.
Do you know any useful resources you could point me to?
Brock
Thu 7 Jun 2012, 8:02 am
Permalink
Afraid not
Sorry, I don't have much experience with multilingual support. I would start at the Internationalization project, but I'm not sure where to go from there.
Add new comment