Document

Add Document

The Documents section on the collection view page below lists all the collection’s documents:

_images/ViewCollection.png

When a collection is created, M2 automatically creates the collection’s document with the same name as the collection’s name.

If you want to add a new document that will format the collection, click the Add Document tab to load the add document section of the page. You will enter the name and the description of the document optionally and then click the Add Document button to add the document:

_images/ViewCollection-AddDoc.png

The next step in a model creation is to view the collection’s document and to start adding fields to it.

View Document

When you click a document’s link on the collection page,

_images/ViewCollection-ClickDocument.png

the document view page will be loaded:

_images/ViewDocument.png

There are few buttons you can use:

  • Models (go back to M2 home page that lists all models you have access to)
  • Full Model View (the full model view page that shows all elements of the model)
  • Update (update document)
  • Copy (copy document)
  • Delete (delete document)

The structure of a collection can change over time in which case you may either keep changing the original document or end up with more than one document per collection. This is the reason why documents have active property. This property indicates if the document is still actively involved in defining the collection format in which case its value is yes or if it is kept here just for historical and documentation purposes so that you and users of the model see the history of changes on the collection structure, in which case its value will be no.

The bottom part of the document page lists the fields of the document.

Update Document

Click the Update button on the document page to update the document

_images/ViewDocument-Update.png

and the update document page will be loaded:

_images/UpdateDocument.png

You can update the name, the description and the active flag of the document and click the Update button to submit the updates. Otherwise, click the Cancel button if you do not want to update the document.

The structure of a collection can change over time in which case you may either keep changing the original document or end up with more than one document per collection. This is the reason why documents have active property. This property indicates if the document is still actively involved in defining the collection format in which case its value is yes or if it is kept here just for historical and documentation purposes so that you and users of the model see the history of changes on the collection structure, in which case its value will be no.

If you want to update or remove some of the document’s fields, you would click the field’s link to load the field’s page and do the intended operation accordingly.

Copy Document

Click the Copy button on the document page to make a copy of a document in its related collection:

_images/ViewDocument-Copy.png

This is how the copy document page looks like when it is loaded:

_images/CopyDocument.png

Enter the name of the new document that will be a copy of the original document and click the Copy button to copy the document. Otherwise, click the Cancel button to go back to the document page.

The whole document is copied together with all of its fields.

The Copy Document can also be used to copy a document in order to start a new version of the document and keep the previous version of the document in M2.

Delete Document

Click the Delete button on the document page to remove the document:

_images/ViewDocument-Delete.png

A small confirmation window will pop up. You can either confirm document removal or cancel it.

When the document is removed, all fields associated with it are also removed.