wow, what a find this module is!! i was discussing this precise need over here: #1473486: move autocomplete widget to a block?
..then got turned on to tape, then read this, "This module does not have a true dependency on Panels. If you enable
it without Panels it will not appear to do anything, but the edit
links are still usable and other modules may implement them."
and so i'm a bit confused: if i enable the module (with no panels usage) and give a user access to contextual links, will the user be able to edit the "entity reference field" within a node (without the extra "node edit" step)? if not, what is the suggested implementation?
any advice is greatly appreciated.
Comments
Comment #1
R.J. Steinert commented@Zilla It sounds like what you are asking is if FAPE module will cause contextual edit links to show up on node fields. It does not support this out of the box but I am trying to figure out how to make this happen. Here's an outline of my best guess so far.
Drupal does not provide contextual links for fields, so we're going to have to build that ourselves.
To do:
1. "Contextual Links on Fields" - Build in a mechanism to add contextual on Fields.
2. "Edit this field" menu item - A link on contextual links for Fields that link to the field-edit-form provided by the FAPE module.
For number 1, I think we need to do something with hook_field_attach_view_alter to add things like the CSS class "contextual-links-wrapper" and ... get the contextual links for this field, run it through a render function and then attach it as markup? It's worth studying the node module, menu module, block module, and Views module (I'm still trying to figure out what "Global: Contextual Links" field is for in Views).
For number 2, when we have Drupal expecting there to be contextual links for fields, we need to add the "edit this field" as a menu item like:
That's an example from http://drupal.org/node/1089922.
On a side note, we could also take an approach of trying to do this with something like Fields in Views, but it seems to me that if we could tackle "Contextual Links on Fields" then we would cover all the bases where fields might show up.
Lastly, for some context here, I'm looking at this approach as a way to get close to inline editing in Drupal. With the Aloha module allowing us to do inline editing on text fields we are inspired to do away with the edit page but we need a way to edit other fields like image fields and the approach described above, from my research so far, seems like a way we could achieve that by using a lot of what is already in Drupal 7 core.
Comment #2
zilla commentedthank you for such a detailed reply. anything closer to inline editing would obviously be a huge boost, and it sounds like the "fields" related inline is a big piece of the puzzle...
Comment #3
gooddesignusa commentedUse the panelizer module to render whatever content type you want as a panel.
Set up the default content to have the title , body and whatever other fields you need.
FAPE will automatically add the contextual links to those fields when viewing the node.
If you have the overlay module turned on the edit links for the fields will open in an overlay.
Comment #4
damienmckennaLets make this a UI issue.
Comment #5
dude74 commentedThks to #3 gooddesignusa
This solution is really better and more stable than editable fields, which presents too much bugs. Workd perfectly for me.
Comment #6
rudiedirkx commented