Active
Project:
BackReference
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Sep 2010 at 05:59 UTC
Updated:
25 Feb 2011 at 16:22 UTC
Jump to comment: Most recent file
It would be really useful if the BackReference settings could be either exported in Features along with the relevant CCK field (so it displays in hook_content_default_fields), or if it was selectable as a component to be manually exported; in the interest of simplicity I think the former approach would be best.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | backreference-n922292-5.patch | 2.21 KB | damienmckenna |
| #4 | backreference-n922292-4.patch | 2.21 KB | damienmckenna |
| #3 | backreference-n922292-3.patch | 2.21 KB | damienmckenna |
| #2 | backreference-n922292-2.patch | 2.24 KB | damienmckenna |
| #1 | backreference-n922292.patch | 2.91 KB | damienmckenna |
Comments
Comment #1
damienmckennaHow's about this? I tried to take simple approach - it uses the CTools export functionality, the 'field_left' field is used as the primary key, and the list of items on the components page is provided as "$field_left -> $field_right". Good enough for now?
Comment #2
damienmckennaHad accidentally included some unnecessary example code in the last patch.
Comment #3
damienmckennaHere's a better patch that fixes a bug in backreference_backreference_field_symmetry_list() (no arguments are needed when overriding the default hook_[table]_list() call) and cleans up the export strings.
Comment #4
damienmckennaA slight tweak to the patch to change the list row name to the format "[left] to [right]".
Comment #5
damienmckennaForgot to update a comment.
Comment #6
aron novakThanks, I committed it to the 6.x branch, i tested and works fine. It's really important to be able to put config in code for all modules, very valuable effort!
I'd see one thing to improve: do you think it's possible to somehow make a dependency between the content-type and the backreference configuration? So when a user selects a content type for export what contains a backreference setting, that setting is automatically added without the need of selecting it manually. Do you think it makes sense?
Comment #7
aron novakComment #8
damienmckennaThanks Aron.
I haven't looked into Features' APIs that much, but I think it'd be better to have it automatically attach to the fields rather than the content type.
Comment #9
aron novakRight, i think for the perfect solution, we need to achieve automatic attach to the proper field.
Do you know any good documentation on CTools Export API? I haven't found anything yet. Of course it's always possible to read the source, but maybe there is some pre-processed knowledge somewhere :)