4

I have plenty of Panels pages that I track using the Features module. Currently, if I create put a Custom Content pane inside of a page, all of the content that is inside that pane is then stored in code.

If I make the custom content pane reusable or use a block instead, it is referenced by id. I don't want this behavior, either. For example, I create the block on my development environment, add it to my page, and commit my feature containing that page to version control. When I pull those changes into my test environment, the page is looking for a block with a specific id. Chances are the block won't exist, and I have to go create it. When I do that, though, there's no guarantee that my block will have the same id. Even worse, a block might already exist with that id, and the page will be using a block with completely unwanted content!

Blocks that are organized using the Context module rather than Panels have the same problem, I think.

I'm looking for a module or an approach that lets me reserve a space for content. I don't want that content to be kept in code (my feature) at all, but I do want the feature to know that my panel or context has a space reserved for that content. Modifying the content shouldn't cause the feature to show up as overridden.

Is there an existing module that allows for this functionality? If not, which module developers should I contact in order to get this sort of thing implemented? Or will a whole new module need to be created for this?

Maybe I'm misunderstanding the current behavior of these modules, even. Any help would be appreciated.

By the way, I don't think this is a problem that's specific to one version of Drupal, but if you have to pick a Drupal version to talk about, I'd say 7.

3

Though I don't think this solves your problem of not wanting the content included in the feature at all, there are 2 ways that I know of to be able to create blocks that don't use numerical ids, and that can therefore be safely included in a feature.

  1. Boxes

  2. Beans

Personally, I prefer the Bean approach, since the Bean Bundles are fully fieldable, allowing to create very advanced types of blocks. Both of these modules however essentially allow you to create blocks that have machine_names (feature proof) as opposed to numerical ids, which as you know are a royal pain in the ass when it comes to features integration.

EDIT: actually, now that I think of it, Bean does not create blocks with machine_names - it uses numerical ID's. It is the Bean Types (think Content Types) that have machine_names. So, if you want blocks with machine_names, Boxes is the way to go.

  • Just tried out Boxes. It does use machine names rather than numeric identifiers, which is nice. However, if I add my Box to a feature, the text inside that Box is still stored in code. I want my text to not be stored in code, as I view it as content rather than configuration. If I don't add the Box to my Feature, I still have to manually create the Box with the same machine name on every environment, or else the Panel where the Box belongs will get confused. – arussell84 Jun 9 '11 at 3:36
  • Could you add a box and just leave the content of the box empty? – Tom Kirkpatrick Jun 9 '11 at 7:06
  • There's almost always going to be something else besides that box in the feature. Even if the box is empty at first inside the feature, as soon as I need to recreate the feature for other reasons, the box's content will get included along with the other stuff that I actually need. Also, the text in the box causes my feature to show as overridden, which shouldn't happen until I really need to recreate the feature. – arussell84 Jun 9 '11 at 14:33
  • Yes, I hear you. I actually need to find a solution to this myself. I'm not sure of it's really going to be possible with Features at the moment. – Tom Kirkpatrick Jun 10 '11 at 11:06
  • How about this: Features Override (drupal.org/project/features_override). I haven't tried it yet, as I only just found out about it, but it sounds like it might do the job. – Tom Kirkpatrick Jun 10 '11 at 14:54
1

So I opened some tickets with the relevant modules:

Unfortunately, it doesn't seem there's an elegant way to accomplish this at all.

0

I just read about a module that let's you do this, Bean Panels:

Provides a ctools content type for bean module, allowing placement in panels.

Features
Loose coupling, enter your bean delta - the delta need not exist. If the delta does not exist and permissions are sufficient presents a link to add the bean. Pure separation from content and configuration - your panel is tied to a bean delta but the content does not have to exist.

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.