[MAGNOLIA-6917] Allow properties to store List types as values in YAML Created: 05/Jan/17  Updated: 17/Dec/18  Resolved: 17/Dec/18

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 5.5
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Richard Gange Assignee: Unassigned
Resolution: Workaround exists Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Allow properties to store List types as values in YAML.

Use case:
A customer would like to store links to css and javascript files on the parameters node.

parameters:
  jsFiles:
    - //repo.xzy.com/jslib/jquery/highcharts/4.2.5/highcharts.js
    - //repo.xzy.com/jslib/jquery/highcharts/highcharttable/2.0.0/jquery.highchartTable-min.js
    - //repo.xzy.com/jslib/momentjs/2.15.1/momentjs-min.js
    - /.resources/services/themes/app/js/libs/pages/highcharts-table.js
    - /.resources/services/themes/app/js/libs/pages/fundPage.js


 Comments   
Comment by Richard Gange [ 17/Jan/17 ]

Here is a workaround using a page template example.

jsFiles declares a json string. String is a supported type:

title: Light Module Home Template
renderType: freemarker
templateScript: /training-light-module/templates/pages/main.ftl
parameters:
  jsFiles: {
    file1: "//repo.xyz.com/jslib/jquery/highcharts/4.2.5/highcharts.js",
    file2: "//repo.xyz.com/jslib/jquery/highcharts/highcharttable/2.0.0/jquery.highchartTable-min.js",
    file3: "//repo.xyz.com/jslib/momentjs/2.15.1/momentjs-min.js",
    file4: "/.resources/services/themes/au/app/js/libs/pages/highcharts-table.js",
    file5: "/.resources/services/themes/au/app/js/libs/pages/fundPage.js"
  }

Then in the script:

[#list def.parameters.jsFiles?values as value]
    ${value}
[/#list]
Comment by Richard Gange [ 17/Dec/18 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

Best regards,

The Magnolia Support Team.

Generated at Mon Feb 12 04:19:03 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.