Needs review
Project:
Bean (for Drupal 7)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2012 at 00:31 UTC
Updated:
16 Oct 2020 at 22:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
indytechcook commentedI like this idea. It's good Drupal practice also.
Comment #2
indytechcook commentedPulling related issue #1647542: Making Bean Title accessible to Views Mode
Comment #3
broeker commentedHere is a patch that provides support for hook_field_extra_fields().
In my case, I am just using hook_entity_view() in a custom module to handle the actual output, but this patch provides the necessary support for the Manage Display UI within the Beans admin. This allows you to drag and drop your title ("Bean field: Title") within your view mode. I'm not actually using Display Suite, so I'm not sure how they handle the field output or if you will need additional steps to actually alter your view mode, but this patch will be required either way and should cause the Bean field: Title field to show up in the view modes UI.
Comment #4
indytechcook commentedSetting to Needs review so testbot can run.
Comment #5
skwashd commentedThe patch from @broeker at #3 looks good to me. I think it is good to allow users to be able to reorder the fields in the form too, so I've added that to the patch.
Comment #6
indytechcook commentedLooks good to me!
Comment #7
indytechcook commentedhttp://drupal.org/commitlog/commit/22232/ce842fd477bb08468350bdcc4d40fa8...
Comment #8
johnnybgoode commentedimplementation of hook_block_view_alter to support the title field added by hook_extra_fields in the patch from #5.
Comment #10
mducharme commentedThe default Bean title is still not configurable in Display Suite as per #1647542: Making Bean Title accessible to Views Mode.
I tried using the extra fields DS feature with the entity|bundle|field setting of "bean|my_block_type|title" but it basically breaks the title field (can provide details if useful).
Comment #11
oxyc commentedI made a quick module to support this better. It replaces the beans own extra field and adds a ds field with the same settings as nodes/terms/etc (setting heading tag, classes etc).
https://github.com/generoi/bean_ds
Comment #12
davidwbarratt commentedoxyc,
Can you put your module on Drupal.org?
Thanks!
Comment #13
leo pitt commentedI've worked around the problem of bean title fields not respecting manage display settings using the https://www.drupal.org/project/title module.
Use it to replace the bean title field with a field entity - this will place the title field into the content array where it can be properly managed via display settings and display suite.
You'll then have two titles - one coming from the block template h2 and the other from the content array. I created a new block template block--bean.tpl,php with the title h2 removed and that seems to work.
Comment #14
Leeteq commentedhttps://github.com/generoi/bean_ds - "Deprecated in favour of"..: https://github.com/generoi/ds_contrib
Comment #15
gordon commentedI needed this fixed, and also found a problem in display suite that stopped the title from displaying when overriding the layout. I have submitted the issue #2908712
Here is my patch to bean which adds ds support.
Comment #16
gordon commentedI merged in the previous patch which also makes it compatible with bean forms as well.
Comment #17
gordon commentedOpps, broke something.
Comment #19
damienmckennaComment #20
maxmendez commentedTested patch #17 and works fine in my environment.