Right now, if I store a custom content pane in a feature, it stores everything including the content inside the pane. I'd like the ability to store everything about the custom content pane *except* the content inside. This way, the pane acts as a sort of placeholder, and when the content team edits the text inside it, I don't have to keep recreating my overridden feature.

Comments

merlinofchaos’s picture

Status: Active » Closed (won't fix)

Unfortunately there's really no way to accomplish this.

jtherkel’s picture

Found this question via search (three years later.) I'm dealing with the same issue. I was able to pull the content out of my feature in these steps.

1) For the custom content pane, I checked the "re-use this content" box. Even though I only use it the pane in one place, I think this makes it possible to refer to the content pane ID, without including the text.

2) By default, the feature would include all the content. While re-creating the feature, I was able to uncheck a box that related to the specific content. (I'm sorry, I cannot locate it in the UI right now.)

Now my feature references the machine name of the custom content pane. The reference resides in:

sites/all/modules/features/name_of_my_feature/name_of_my_feature.pages_default.inc

The specific code looks like this. I know that the content was not included because when I copied the feature from my Dev environment to my Stage environment, the Panels UI complained about missing reference or something like that.

3) In my Stage environment, I manually created the custom content pane with the same machine name as on the Dev server, and the content magically popped into place. We can edit the content on Stage and re-deploy the feature without overwriting content.

$display->panels = array();
  $pane = new stdClass();
  $pane->pid = 'new-2';
  $pane->panel = 'middle';
  $pane->type = 'custom';
  $pane->subtype = 'custom';
  $pane->shown = TRUE;
  $pane->access = array();
  $pane->configuration = array(
    'admin_title' => '',
    'title' => '',
    'body' => '',
    'format' => 'wysiwyg',
    'substitute' => TRUE,
    'name' => 'machine_name_of_my_custom_content_pane',
  );

-John