Similar to #3098138: All footnotes available as block for Layout Builder / Paragraph / ..., about adding an "extra" field using hook_entity_extra_field_info() to display all of the footnotes? I think it'd be worthwhile reusing the service from #3098138 so that all footnotes can be displayed regardless of what entity they come from.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | footnotes-n3252527-10.patch | 1.64 KB | damienmckenna |
Comments
Comment #2
damienmckennaComment #3
damienmckennaComment #4
alexis_mc commentedI created a patch following the issue description. It has the https://www.drupal.org/project/footnotes/issues/3098138 custom service in order to make the "extra" field work. Any comments or suggestions are welcome.
Comment #5
damienmckennaComment #6
lucuhb commentedHello,
I have tried this patch but I have the impression that the content of this extra field is empty. I can't display the footnotes group on the node.
In the
footnotes_preprocess_node()function, thefield_footnotes_groupis not added because$footnotes_group->buildFooter()['#footnotes']is empty.I have tested the patch #29 in issue 3098138 (All footnotes available as block for Layout Builder / Paragraph / ...) in association with this current patch (only a part because patch could not be applied) : the footnotes group block gives some data, but the extra field given by this patch is empty.
Here is the part I used from the current patch, the other parts are already given by the patch in issue 3098138
Comment #7
damienmckennaThis is the bit that lucuhb indicated is all that's necessary in order to have this work in addition to the latest patch from #3098138.
Comment #8
damienmckennaThis works, it uses #lazy_builder to generate the output after the service has loaded the data via the text filter. This will also require the latest patch to #3098138 in order for it to work.
Comment #9
damienmckennaDon't display the extra field by default, so that it then doesn't have to be disabled on every view mode.
Comment #10
damienmckennaThe correct patch.
Comment #11
jaydip makawana commentedRe-rolled patch against 3.1.0
Comment #12
jaydip makawana commentedRemoved Patch created. No change. Uploaded same patch by mistake.
Comment #13
scott_euser commentedComment #14
scott_euser commentedGoing to merge this into 4x and created a follow-up here #3413181: Follow-up to all footnotes available as a block to apply to modal plugin to apply it to the new modal version before the old one gets retired. Patches still needed while on 3x until 4x (and its upgrade path are more stable).
Comment #16
scott_euser commented