Bringing Shortcodes to Drupal

Nov 28, 2011
by Ivan

One of the things I love the most from Wordpress is the ability to define custom shortcodes on your theme's functions.php. This is possible on Drupal, but as with most things with my favorite CMS, it is more powerful but requires more work to set it up.

Ingredients

Creating a Shortcode

Once you have Custom Filters enabled, go to the module page and add a new filter. Name it the way you want, and click save. Once you are back in the filters list, click on the one you just created so we can create a rule.

Custom Filter
When creating a rule, you have to provide a regular expression of the code you want to replace. In this case, we are going Wordpress style [shortcode] and we will just replace it with a image. We will use [checkmark] as our short code, so under Pattern add:
Posted in

Drupal 7 theme structure

Jul 11, 2011
by Ivan

I decided to create an explanatory graphic that ilustrate the different theming portions of Drupal 7 and how to access and modify them. This is not a theming tutorial but a quick guide to see the different parts of a Drupal theme.

Notes:

 

Posted in