Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
wondering if it is possible to add a colorbox-node link formatter for field widgets, such as the option to link an image with it's content
Comment | File | Size | Author |
---|---|---|---|
#3 | entity-reference-integration.patch | 4.63 KB | iLLin |
Comments
Comment #1
iLLin CreditAttribution: iLLin commentedI've thought about this, but with the rewrite option in views, I never felt the need.
Comment #2
Andre-Bduring the first builds with views I did not feel the need either, but lately I am working a lot with rendered entities, and it's a pain to rewrite a a complete template just to be able to insert a colorbox_node link. I might take a look at this issue later, if no one else steps in...
Comment #3
iLLin CreditAttribution: iLLin commentedHeres an initial patch. I do not like this approach and it doesn't quite work under the display formatters. I spent only an hour or so getting an "idea" on how it works and I couldn't find a way to alter or add extra fields without the method im doing it. I repeat if there is a better way lets do that. I have attached the patch here against the lastest version of DEV.
Comment #4
Modern Smith CreditAttribution: Modern Smith commentedHi, thank you for your efforts. I find this feature extremely uselful. I tried the patch. The formatter option appears nicely in the entity reference field´s display management. I selected Label format/Link Label to the referenced entity, and Open in a Colorbox and left the width and heigth as they were (600). Then I selected Update and Save. However, the Open in a Colorbox selection don´t let it be saved. When I open the formatter again after saving, the selection box isn´t ticked any more. In the log reports I got following notice:
Type php
Location http://www.mysite.com/system/ajax
Referrer http://www.mysite.com/admin/structure/types/manage/test-colorbox-node/di...
Message Notice: Undefined index: colorbox_node_link in colorbox_node_field_formatter_settings_form() (line 270 of /home/mysite/public_html/sites/all/modules/colorbox_node/colorbox_node.module).
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedSame as #4. No option from colorbox_node is saved.
Comment #6
Andre-BComment #7
iLLin CreditAttribution: iLLin commentedI have updated / fixed this on DEV. Let me know if you experience any issues. You will need this module for it to work https://drupal.org/project/field_formatter_settings
http://drupalcode.org/project/colorbox_node.git/commit/afba79b