Programmatic creation of panels

perceptum's picture

Hi

Is there a Programmatic way to import an exported panel? I have created some panels and I want to load them, on mass, into a new site. Assuming the content types , views etc are all identical - can this be done? I cant seem to find anything related to this...

Thanks in advance!

Bryan

Groups:
Login to post comments

It's possible!

goechsler - Wed, 2009-09-30 13:02

Looking at the ctools_plugin_example of the CTools package, you'll find a programmatic definition of a panel in ctools_plugin_example.pages_default.inc. It's implemented in hook_default_page_manager_pages.

The key to make it work it the implementation of hook_ctools_plugin_api. You'll find it implemented in ctools_plugin_example.module. Without this hook_default_page_manager_pages isn't called.

--

Update: Have you tried the Bulk Exporter module? It generates code for a module defining your panel stuff. Really impressive...


Look at APK / AF

Michelle - Tue, 2009-09-29 15:13

Advanced Profile Kit and Advanced Forum (2.x only) both use variants from code so you can look to those for examples.

Michelle

-- Sig --
I'm looking for folks to help me out by posting in my Coulee Region forums. You don't need to live in the area; there's plenty of general forums. But please, no Drupal support questions. :)


The CTools example only shows

stripped your speech - Thu, 2009-10-22 14:28

The CTools example only shows 1 handler. I have multiple handlers. How do you import them all at once? I have a folder with about 15 .inc file exports of node_view tasks.