1

How can I alter a panel page variant provided by another module in my own module?

I am using Advanced Forum, and it provides a panel page to override Drupal's core forum display behavior and some variants: Top Level Forum, Container and Forum. But I have changed some layout options, and added a few more panes, and disabled some other panes etc in page manager UI. Now I want to export this into code, i.e. in my custom module. I can export the code using the export option in the UI, but I don't know how to add that code in my module. In other words I don't know which hook to implement to override this variant provided by Advanced Forum, instead of creating my own variant.

I know how to provide default panel pages or variants using hook_ctools_plugin_api() and hook_ctools_plugin_directory(), but I couldn't find out how to alter an existing page variant provided by another module.

Is there a hook for that?

1 Answer 1

1

You might try creating a clone of this variant and then making your custom changes to it. You can then reorder this variant so it is above the original. This way your custom variant will always get executed and the original one ignored.

Once that is completed, you should then be able to export your variant using features.

1
  • I did exactly the same, except that using features export I created it in my custom module using hook_ctools_plugin_api(), but I forgot that I asked a question here, otherwise I'd write how I overcame this. Thanks, and +1 :) Feb 8, 2014 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.