[opencms-dev] Selection of pre-defined nested contents on content creation as reference and automatic update on change

Schliemann, Kai K.Schliemann at comundus.com
Thu Dec 12 09:30:13 CET 2019


Hi Axel,


  1.  We did something similar by using the OpenCmsFilewidget (I guess the correct name is OpenCmsVfsFile) as a field in XML-Schema B to choose a file of type XML-Schema A. This way you are not able to edit the „nested“ content of type „A“ within the edit form of type „B“. Contents of type „A“ can be edited  by navigating to the content folder of type „A“ and edit the elements there. If you already have a formatter for type „A“, you can create and edit your contents in the frontend too.
  2.  If done like described in  1), contents are just linked, and therefore updated when edited outside of type „B“.
HTH
Regards
Kai


Von: opencms-dev-bounces at opencms.org <opencms-dev-bounces at opencms.org> Im Auftrag von Axel Muehring
Gesendet: Mittwoch, 11. Dezember 2019 11:05
An: opencms-dev at opencms.org
Betreff: [opencms-dev] Selection of pre-defined nested contents on content creation as reference and automatic update on change

Hello,
please imagine the following setup:

* XML-Schema A (e.g. Article)
* XML-Schema B (e.g. Newspaper)
* This schema contains some standard elements (like openCmsString,...) and also nested elements, like XML-Schema A
Issue:
If a user creates new content for XML schema B, then openCMS displays by default an page with all values either empty or set to a fixed default.

1.)
I would like to define, that for selected(defined in XML schema) nested elements the users get a "library selection popup/choice box", from where existing content (here articles, based on XML-SchemaA) can be selected.
The user shall not be requested to manually fill out all single fields manually (openCMS default behavior).

2.)
The content shall also be linked, not copied, so if the article is modified later, then the referenced content in the "newspaper (XML Schema B)" is automatically updated.

Do you have any hint for me?

A similar use case is e.g. the picture gallery, where the user is already presented a selection of available images instead of drawing a new image manually.

Thanks in advance,
Axel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20191212/d4034cf5/attachment.htm>


More information about the opencms-dev mailing list