[YAMLEXT-9] Is there a way to "inherit" availableComponents in an area definition Created: 21/Feb/17  Updated: 19/Jul/17  Resolved: 20/Mar/17

Status: Closed
Project: Yaml extensions (closed)
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Support Request Priority: Neutral
Reporter: Fadi Wissa Assignee: Aleksandr Pchelintcev
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MGNL 5.4.7


Issue Links:
Relates
Template:
Documentation update required:
Yes

 Description   

We have recently switched to using YAML configuration and have the current pain point:

Area A has availableComponents: a1, a2, a3
Area B has availableComponents: b1, b2, b3

Area AB needs to have availableComponents: a1, a2, a3 and b1, b2, b3 (needs to merge availability from A with those from B)
Area AX needs to have availableComponents: a1, a2, a3 and x1, x2, x3 (needs to extend availability of A)

I have been able to use the !include as follows:

  • Create a YAML file that only has a list of available components and then use !include to include it in various areas that need to use that same list

However, if any component needs to add even a single additional component (or merge two lists) I have not managed to make the !include work multiple times (to merge) and have not been able to add other components after the !include was used (to extend)

... so I had to copy and paste the list of components and add/modify as needed

I would appreciate your feedback if there's a way around this.



 Comments   
Comment by Fadi Wissa [ 22/Feb/17 ]

Never mind this one - I just used the !extend tag from this solution:
https://www.magnolia-cms.com/blogs/aleksandr-pchelintcev/detail~@yaml-extensions-for-lighter-development--to-jcr-and-beyond~.html

Thank you!

Generated at Mon Feb 12 11:15:37 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.