[Hippo-cms7-user] DerivedDataFunction dynamic value of document field

Niels van Kampenhout n.vankampenhout at onehippo.com
Wed Jun 20 22:46:41 CEST 2012


On Tue, Jun 19, 2012 at 2:52 PM, rmtl <rguyonnet at alogient.com> wrote:
> in a folder , there is one document A and several document B.  but if there
> is 2 folders , there is will be document A1 in folder F1 and document A2
> infolder F2.
>
> What I need , is that multiple document B  has the a field computed  from a
> document A  field in the same folder.

Do you actually need to store the value from A in all the Bs as well,
or do you only need to display the value from A in the editing
template for the Bs?
In the latter case, you can create a custom field plugin. You will
have access to the document node (through its JcrNodeModel) so you can
use the JCR API to look up node A. I've done this in a project a few
years ago.

Hope this helps.

Regards,
Niels



More information about the Hippo-cms7-user mailing list