1
|
CONTENTS OF THIS FILE
|
2
|
---------------------
|
3
|
|
4
|
* Introduction
|
5
|
* Requirements
|
6
|
* Installation
|
7
|
* Configuration
|
8
|
* Using field collection with entity translation
|
9
|
* Maintainers
|
10
|
|
11
|
|
12
|
INTRODUCTION
|
13
|
------------
|
14
|
|
15
|
Provides a field collection field to which any number of fields can be attached.
|
16
|
|
17
|
Each field collection item is internally represented as an entity, which is
|
18
|
referenced via the field collection field in the host entity. While
|
19
|
conceptually field collections are treated as part of the host entity, each
|
20
|
field collection item may also be viewed and edited separately.
|
21
|
|
22
|
|
23
|
REQUIREMENTS
|
24
|
------------
|
25
|
|
26
|
This project require the following projects:
|
27
|
|
28
|
* Entity API (https://www.drupal.org/project/entity)
|
29
|
|
30
|
|
31
|
INSTALLATION
|
32
|
------------
|
33
|
|
34
|
Install as you would normally install a contributed Drupal. See:
|
35
|
https://drupal.org/documentation/install/modules-themes/modules-7 for further
|
36
|
information.
|
37
|
|
38
|
|
39
|
CONFIGURATION
|
40
|
-------------
|
41
|
|
42
|
* Add a field collection field to any entity, e.g. to a node. For that use the
|
43
|
the usual "Manage fields" interface provided by the "field ui" project of
|
44
|
Drupal, e.g "Admin -> Structure -> Content types -> Article -> Manage fields"
|
45
|
|
46
|
* Then go to "Admin -> Structure-> Field Collection" to define some fields for
|
47
|
the created field collection.
|
48
|
|
49
|
* By the default, the field collection is not shown during editing of the host
|
50
|
entity. However, some links for adding, editing or deleting field collection
|
51
|
items is shown when the host entity is viewed.
|
52
|
|
53
|
* Widgets for embedding the form for creating field collections in the
|
54
|
host-entity can be provided by any module. In future the field collection
|
55
|
project might provide such widgets itself too.
|
56
|
|
57
|
|
58
|
USING FIELD COLLECTION WITH ENTITY TRANSLATION
|
59
|
-----------
|
60
|
|
61
|
* Field Collection items must be selected as a translatable entity type at
|
62
|
Admin -> Config -> Regional -> Entity Translation.
|
63
|
|
64
|
* The common use case is to leave the field collection field untranslatable
|
65
|
and set the necessary fields inside it to translatable. There is currently
|
66
|
a known issue where a host can not be translated unless it has at least
|
67
|
one other field that is translatable, even if some fields inside one of
|
68
|
its field collections are translatable.
|
69
|
|
70
|
* The alternate use case is to make the field collection field in the host
|
71
|
translatable. If this is done it does not matter whether the inner fields
|
72
|
are set to translatable or not, they will all be translatable as every
|
73
|
language for the host will have a completely separate copy of the field
|
74
|
collection item(s).
|
75
|
|
76
|
* When using nested field collections, the configuration of the fields and
|
77
|
field collections is very important. The recommended approach is to first
|
78
|
enable entity translation as defined in step 1, and set the outer
|
79
|
field collection field as translatable and all its sub-fields to language
|
80
|
undefined. The sub-field collections and its sub-fields should also be
|
81
|
set to language undefined. This will ensure that every language of the host
|
82
|
will have a completely separate copy of the field collection item(s) and
|
83
|
its fields.
|
84
|
|
85
|
|
86
|
MAINTAINERS
|
87
|
-----------
|
88
|
|
89
|
Current maintainers:
|
90
|
* Joel Muzzerall (jmuzz) - https://www.drupal.org/user/2607886
|
91
|
* Joel Farris (Senpai) - https://www.drupal.org/user/65470
|
92
|
* Lee Rowlands (larowlan) - https://www.drupal.org/user/395439
|
93
|
* Nedjo Rogers (nedjo) - https://www.drupal.org/user/4481
|
94
|
* Ra Mänd (ram4nd) - https://www.drupal.org/user/601534
|
95
|
* Renato Gonçalves (RenatoG) - https://www.drupal.org/user/3326031
|
96
|
* Wolfgang Ziegler (fago) - https://www.drupal.org/user/16747
|