I've been using Panic's Coda as my default editor/IDE for some time now. I've already shared the Drupal plugin I wrote on this blog. But one of the other tricks Coda allows me to do is snippet management using its Clips feature. There's quite a few Coda clips available on the net. Here I am sharing the Clips I use the most during Drupal development and theming.
Download the package and develop faster yourself. There's something for everyone in it...
Of course I have some snippets for the most used Drupal hooks. All of these have a tab trigger. For example hook_perm can be inserted by typing hook_perm and pressing
In the package are hook_perm, hook_menu_alter, hook_init, hook_nodeapi, hook_menu, hook_cron, hook_boot, hook_flush_caches, hook_form_alter, hook_block, hook_theme, …
These are probably the ones I use most often. Snippets for these elements: hidden field, textfield, submit button and select field.
.views-row the surround .views-row diff gets "active" too.print_r : Just type print_r and hit print_r : print "
".print_r(, TRUE)."
";
. Perfect for quick debugging.switch control statement.The obligatory "Lorem ipsum" snippet. Just type lorem and hit
| Attachment | Size |
|---|---|
| drupal-coda-snippets.zip | 12.17 KB |
Comments
Go ahead ;) I'll have a look myself too.
Hey, we should try and consolidate some of this stuff! :)
http://github.com/q0rban/drupal-coda-clips
Here's a snippet for a Theme .info file:
; $Id$
name =
description = "The description of this theme"
; Screenshot in appearance overview
screenshot = screenshot.png
; Required core version (Drupal 6+; no effect in Drupal 5)
core = 6.x
; Required. Most themes should use "phptemplate" as the default engine.
engine = phptemplate
; Base theme, allows for theme inheritance, meaning the resources from
; the "base theme" will cascade and be reused inside this sub-theme
; base theme = garland
; Block regions
; regions[theRegion] = The region name.
; PHP version requirement (Drupal 6+)
; php = 5.2
; Features
; features[] = logo
; features[] = name
; features[] = slogan
; features[] = mission
; features[] = node_user_picture
; features[] = comment_user_picture
; features[] = search
; features[] = favicon
; features[] = primary_links
; features[] = secondary_links
; Stylesheets
stylesheets[all][] = style.css
; Scripts
scripts[] = script.js
; For further information about configuration options, see
; - http://drupal.org/node/171205 (Drupal 6)
Interesting. Well i will do the same with eclipse then.
Post new comment