Module Development

CTools Style Plugin: Putting It All Together for Drupal 7

Check your version

This tutorial covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Sprout Video

Now we have all the code in place for both our custom module and our style plugin. It's time to put it all together into our pane template file.

In this lesson...

  • Connect values from settings form to template file
  • Utilize values from pane object
  • Utilize values from submitted settings form

All the code for the module and plugin is contained in the Resources section of this lesson. It's now your turn to create your own CTools Style Plugin!

Additional resources

The code for this plugin and module is located in sites/all/modules/demo_panestyles. See Companion Files to download the Files export, which also contains a demo site for Lessons 8-19 of Building Websites in Drupal 7 with Panels. Log in at /user with username "admin" and password "admin."