By default Panopoly Pages doesn't display the Body Summary field. I'm trying to programmatically set display_summary in a Feature, but Panopoly Page doesn't appear as a Features Content Type component.

Solved: I used defaultconfig. Since its project page is vague, here are the explicit steps:

  1. Create a new Feature. (This example uses mtms_panopoly_page as the Feature name.)
  2. In the Default config section, select the Fields: node-panopoly-page-body component.
  3. Export the Feature.
  4. In the mtms_panopoly_page.info file, comment out the line starting with features[defaultconfig][]
  5. Install the Feature: drush –v –y en mtms_panopoly_page (-v gives you verbose output)

I'm left with a couple of questions: (The editor ignores my unordered list. Switching to an ordered list. Please visualize bullets.)

  1. It seems that defaultconfig only commits your changes during a module install. Is that correct?
    1. If so, adding new defaultconfig components to an existing Feature would require uninstalling and reinstalling it.
  2. The defaultconfig project page states that you manually have to change function yourfeature_functionname() to function yourfeature_defaultconfig_functionname(), but in my case, the correct function name was already generated. Is that the normal behaviour these days?
  3. Defaultconfig generated code to populate every Body setting. I'm only interested in defining a default value for display_summary. If I removed all code dealing with other settings, would the rest of the Body field remain defined (with display_summary getting my default value), or would the Body field be missing every other setting (only display_summary defined)?

Although this deals with a Panopoly field, these questions are more specific to defaultconfig. I will gladly post any answers on the defaultconfig issue queue when this issue is closed.

Comments

UTAN_dev created an issue. See original summary.

UTAN_dev’s picture

Issue summary: View changes
UTAN_dev’s picture

Or 3) should I set the desired value in the UI, then capture it in a Feature using defaultconfig? (Features > Recreate > Default config section > Fields: node-panopoly_page-body)

UTAN_dev’s picture

Issue summary: View changes
UTAN_dev’s picture

Issue summary: View changes
dsnopek’s picture

Status: Active » Fixed

I'm glad you found a solution to your problem!

However, I think it would be better to use features_override (included in Panopoly, but not enabled) to solve this. It would allow you to change just the specific setting on the body field, and would persist the change even when panopoly_pages gets reverted. I think this would also answer (or make obsolete) your remaining questions.

I'm marking this is as Fixed, but feel free to re-open if you have any additional questions!

Status: Fixed » Closed (fixed)

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