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

CommentFileSizeAuthor
#3 entity-reference-integration.patch4.63 KBiLLin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

iLLin’s picture

I've thought about this, but with the rewrite option in views, I never felt the need.

Andre-B’s picture

during 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...

iLLin’s picture

Heres 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.

Modern Smith’s picture

Hi, 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).

Anonymous’s picture

Same as #4. No option from colorbox_node is saved.

Andre-B’s picture

Category: Feature request » Bug report
Issue summary: View changes
iLLin’s picture

Status: Active » Fixed

I 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

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.