0

I am trying to serve a collapsible tree diagram from my STRUCTR 2.01 app to describe a hierarchical section of my graph. I based the page on this example

The page correctly serves the nodes but cannot parse the paths. These are defined in the javascript using ES6 template literals.

When I serve the same page directly (i.e. not from STRUCTR) and view in the same browser etc. it works fine.

Is STRUCTR blocking or incorrectly interpreting the javascript template literals ?

comdotdom
  • 35
  • 5

1 Answers1

2

In any content served by Structr, any text enclosed in ${...} is treated as an expression to be interpreted by Structr (we call it StructrScript) serverside.

Seems to be a conflict with ES6 Template Expressions.

As a workaround, you can put the JavaScript code in a file where it's not interpreted by Structr.

Axel Morgner
  • 2,292
  • 16
  • 15
  • Excellent. That worked perfectly. Thank you. If you get a chance to add an example to the knowledge graph of how to feed D3-Hierarchy functions with data from Structr I would really appreciate it. – comdotdom Jan 07 '17 at 10:36