[MGNLUI-4537] Define relationships between content types Created: 16/Apr/18 Updated: 29/Jan/19 Resolved: 09/Aug/18 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0 |
| Type: | Story | Priority: | Neutral |
| Reporter: | Christopher Zimmermann | Assignee: | Oanh Thai Hoang |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 4d 3.5h | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Template: |
|
||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||
| Release notes required: |
Yes
|
||||||||||||||||||||
| Documentation update required: |
Yes
|
||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||
| Epic Link: | Content types foundation | ||||||||||||||||||||
| Sprint: | Saigon 150, Saigon 151 | ||||||||||||||||||||
| Story Points: | 8 | ||||||||||||||||||||
| Description |
|
User story:
A reference is a link to another content type. Acceptance criteria:
|
| Comments |
| Comment by Christopher Zimmermann [ 24/Jul/18 ] |
|
Something important to keep in mind here is that the reference should not be tied to JCR, just to the CT. This "Epic Criteria" item is relevant: https://wiki.magnolia-cms.com/display/TH2/Content+Types+Stories#ContentTypesStories-Criteria:Canworkwithanydatasource |
| Comment by Christopher Zimmermann [ 28/Aug/18 ] |
|
Please describe how this feature works and/or provide an example - or link to a document that does. |
| Comment by Hieu Nguyen Duc [ 29/Aug/18 ] |
|
This is how the implementation meets the acceptance criteria. Referencing to other content typeGiven these two content types /content-type-examples/contentTypes/country.yaml
datasource:
workspace: countries
model:
properties:
- name: countryName
/content-type-examples/contentTypes/tourist.yaml
datasource:
workspace: tourists
model:
properties:
- name: country
type: country
and these two apps /content-type-examples/apps/countryApp.yaml !with-type:country /content-type-examples/apps/touristApp.yaml !with-type:tourist Then the generated detail subapp will show LinkField references to "country" content type App definition shows Data are stored as Reference:Documentation is ongoing: https://documentation.magnolia-cms.com/display/DOCS57/Model+definition |