0

I have feature module A that provides content type X and a panel variant for content type X.

I have another feature module B that provides content type Y and a view content pane of three latest items of type Y.

From feature module B, how can I add a panel pane of the view content pane Y to the panel variant for type X in Feature A?

Is this possible?

Let me know if that's too abstract or ambiguous, and I'll clarify.

1

This looks like the start of what can lead into you what I call "Features Hell". :)

It's possible to make features more maintainable and minimize conflicts if you organize them by small groups or single feature components. Here's what I mean:

  • You have content types X and Y
  • You have, I assume, panelizers for content type X and Y
  • You have views with content pane displays that you want to add to a panelizer

This can be done by divided up your features into four different modules.

foobar_field_bases: contains the fields from content type X and Y under the "Field Bases" component. This stores the global settings of the fields.

foobar_content_types: contains content types X and Y from the features Content Types component, and the content type fields under the Field Instances component.

foobar_views: contains all your views

foobar_panels: contains all panel-related components such as panel layouts, panel renderers, panelizers, page managers.

It may seem like that's harder to maintain because you have more modules now, but consider your issue. You want to update the panelizer content with a view content pane. All you do is make sure the view is in foobar_views. If not, recreate foobar_views with your new view. If it is, update the foobar_views feature so it contains the new display in the feature module. Then do a feature update on foobar_panels.

  • Hi, Thanks for suggestion! When using this approach, is it like an all or nothing approach? Meaning, site #1 can not selectively have content type X or Y, it's going to have both available? That's the same for site #2 as well? – Jason Apr 16 '14 at 13:45
  • That's true, Jason. If you wanted to use the same feature module for another site then all content types would be available whether or not use them. In this situation you can create a feature to download with the content type you need for use with the other site. Alternatively, you can make the foobar_content_types feature module more loosely coupled by creating a feature module per content type. – Evil E Apr 16 '14 at 15:43
  • Thanks for your answer, but I'm looking for something that allows more portable feature modules that are independent of each other. While I haven't exhaustively reviewed the links in my questions' comment, I'm tentatively concluding that this may not be easily accomplished. – Jason Apr 16 '14 at 17:02
  • One thing about the links in your post, I understood them to be asking about including non-exportable items in a panel pane. That wouldn't be the case with a view, so I don't think you need to go through all that complication. Sorry if I'm reading your question wrong! – Evil E Apr 16 '14 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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