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.

Creating a theme() Function for Panel Panes

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
    Creating a Theme Function for Panel Panes
  • 0:00
    With Amber Matz.
  • 0:08
    In order to print out the pane title and settings form values
  • 0:12
    as class names in our pane template file,
  • 0:14
    we need to thread the pane object and the settings array
  • 0:18
    through a theme function, so they will
  • 0:20
    be available to print out in our panes template file.
  • 0:24
    In this lesson, we'll walk through the code of the panel pane theme
  • 0:28
    function that outputs the panel pane content object
  • 0:31
    and the settings array with our selected form values.

Creating a theme() Function for Panel Panes

Loading...

In order to print out the pane title and settings form values as class names in our pane template file, we need to thread the pane object and settings array through a theme function so that they will be available to print out in our pane's template file.

In this lesson, we will:

  • Walk through the pane theme function

By the end of this lesson, you should be able to implement a theme function for a panel pane.

Downloads: 
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."