Download & Extend

API for skipping pane settings form

Project:Panels
Version:7.x-3.x-dev
Component:Plugins - content types
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

On one of our client sites, we wanted to be able to have the user pick a given content type, and if that content type is in some in-code list, then the settings form would not be displayed and would just use the default value.

Is there a sane way to accomplish this outside of hacking panels? If not, is this something that could possibly be included? I think that this could be very useful to sites where end-users have access to edit panels pages.

Comments

#1

Status:active» fixed

I believe you can use the alter hook on content types to tell it the 'add form' for that content type is NULL, and set the 'defaults' the way you want them. Make sure the 'edit form' still exists.

You want to take advantage of this alter:

<?php
drupal_alter
('ctools_content_subtype', $subtype, $plugin);
?>

See ctools_content_form() for how the forms are constructed. At a glance it looks like it might be hard to have an 'edit form' with no 'add form', so a small patch might be required.

#2

Thanks!!

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.