Uploaded image for project: 'Content Types'
  1. Content Types
  2. MGNLCT-59

References to other CT should be explicit

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.1
    • 1.0
    • None
    • Yes
    • Features 3, Features 4, Features 5
    • 5

      User story

      As a developer I want references to another Content Type that are in a YAML Content Type definition file to be explicitly defined as a reference so that everyone has a clear understanding of the content model.

       

      Acceptance Criteria:

      • The syntax of a CT reference in the YAML file is clearly identifiable as such, maybe the type has the name "reference".
      • Developers coming from other products will find the references familiar, and easy to identify.
      • The reference could accept additional properties in the future that are typical on Magnolia link-fields today - such as which chooser dialog to use. 

      Rationale:

      As currently implemented, references to other content types look the same as declarations of standard properties and the same as references to subModels. 

      //currently. Asset is another content type, but it looks like a data primitive, like String.
      
      model:
        properties:
          address:
            type: String      
          slideshow:
            type: Asset
            multiple: true
      
      
      

      But the field does not actually store the type - it stores a reference to the type. This is different from submodels, and it is different from the "basic types".

      Referencing another contentType should be explicit to avoid any confusion and to highlight the references which are a key aspect of a projects content model. This is especially important for developers and for information architects. The content model is an important part of a project that non-developers should also understand.

      Developers need to know that the type stores references as they will need to include specific code to resolve the reference before working with the referenced content.

      References will eventually need more properties: Such as which UI to use (select vs chooser dialog) which chooser dialog to use, which subpath to access, which items to filter out, etc.

       

        Acceptance criteria

              dai.ha Dai Ha
              czimmermann Christopher Zimmermann
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 2d 0.5h
                    2d 0.5h