Check your version

This video 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.

Setting up the Module and Plugin Files

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:00
    Customize Panels Styles with CTools Style Plugins.
  • 0:01
    Setting up the Module and Plugin Files with Amber Matz.
  • 0:08
    AMBER MATZ: Before we can dive into the code of our CTools style
  • 0:10
    plugin, we need to set up a module and create a directory
  • 0:14
    structure for our plugin to live.
  • 0:16
    This will ensure that our code gets executed properly and recognized
  • 0:20
    by Drupal and the CTools API.
  • 0:23
    In this lesson, we'll create all of the files and directories we
  • 0:26
    need in our custom module and plugin.
  • 0:30
    To implement a CTools style plugin, first I

Setting up the Module and Plugin Files


Before we dive into the code of the module and plugins, let's set up the files and directories in a meaningful structure that's both scalable and one that will ensure that our plugin is disoverable by the CTools API.

In this lesson, we will:

  • Create module files and directories
  • Create plugin files and directories

By the end of this lesson, you will have all of the files created with a proper structure, ready for editing.

Log in or sign up to download companion files.
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."