In a Views Content Pane display, it's possible to use exposed or contextual filters as panel pane configuration. We'll walk through this process and why you might want to utilize this feature of content panes.
In this lesson...
- Add an exposed filter to a view
- Use the exposed filter as panel pane configuration
- Place the same view twice with different configuration
Demo site log in:
- Navigate to /user
- Login with admin/admin
Additional resources
Legacy Theme Development
GuideNow 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."
The selling point of a CTools Style Plugin is the settings form. By providing a settings form to the site editor who can then change the style of the page using a pre-approved set of styles, you can both empower and provide appropriate constraints.
In this lesson, we will:
- Use the Form API
- Build a Styles Settings Form
By the end of this lesson, you should be able to build a settings form for your 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."
This screencast covers the following topics:
- Manual import/export of Page manager settings.
- Import/export using Features.
- Some words about the custom rulesets module.
- Some words about the custom content panes module.
- Some words about the stylizer module.
- Some words (but not enough!) about mini panels.
- Some words about Panels everywhere.
- Some words and a quick demonstration of Panels in-place editor.
The sole purpose of our custom module is to implement a hook that will tell the CTools API that we have a plugin. Next, in our plugin's ".inc" file, we'll walk through the extensive $plugin
array, understanding how the keys and values of this array correspond to functions and parameters inside the plugin.
In this lesson, we will:
- Hook into CTools inside custom module
- Explore
$plugin
array
By the end of this lesson, you should be able to implement the correct hook for CTools and understand how to customize your own $plugin
array.
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."
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.
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."
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.
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."
In this exercise you will combine knowledge of Panels and Views to create a complex page layout.
In this video series Karen Stevenson, Michelle Lauer, and Joe Shindelar take a look at the Organic Groups module for Drupal 7. The series starts from the basics, goes through the various required modules used to build a site with Organic Groups, and then gets in depth with creating groups, adding content to groups, and dealing with group membership. In addition to the basics of creating groups, the series also takes a look at the various settings related to both access control and permissions and how you can combine them to create private and public groups. Next we show you how to use the OG Extras module to display more information on the main group page and then how to use the Panels module to display group content and other advanced Fields and Views configuration related to OG. This video assumes that you understand the basics of content, fields, and Views in Drupal. If you need a refresher on these topics, consider reviewing these other tutorial series:
Note: There have been significant changes to Organic Groups since this lesson was made. We use the 7.x-2.x-dev version from May 2012, or the equivalent of 7.x-2.0-alpha3, in our lessons. Though we would like to revisit and update this series, we have no current schedule to complete that. The best place to figure out what has changed and why, would be the Organic Groups issue queue on Drupal.org (http://drupal.org/project/issues/search/og).
Additional resources
This screencast covers the following topics:
- Rearranging the node edit form with Panels.
- Some words about how the render arrays in Drupal 7 makes this possible.
This screencast covers the following topics about the Page Manager module, which is a module included within CTools.
- The basic framework of Page manager – creating custom paths and assigning content/reactions to them
- Mentioning some modules that can be used with Page manager, such as Panels and Contextual administration
- Overriding node templates to allow customized content/reaction
- Introduction to variants
- Introduction to selection rules
- Using the HTTP response code variant type, and using it for redirections
- Introduction to context or contextual objects
Markup in Drupal 7
CourseLearning Page Manager
CourseOrganic Groups with Drupal 7
CourseLegacy Site Building
GuideIn this exercise you will build and position quicktabs within a panel page.
Layouts
TopicA layout can describe how various components are arranged on various levels—from an entire page from the header to the footer, to just the “middle” where the dynamic content goes, to individual components. It can apply to templates for managed content or one-off designs for landing pages.
Each piece of content placed into a panel has it’s own configuration settings, covering everything from display style to access control. In this lesson we will take a tour through the settings for each pane.