0

I have a model which have a relationship with several type of model inside the same property (folder: subfolder and item).

I wonder how to render children of the model without using

{{#if item.isFolder}}
    {{#folder-item folder=item parent=this}}{{/folder-item}}
{{/if}}

{{#if item.isPage}}
    {{#page-item page=item parent=this}}{{/page-item}}
{{/if}}
Charles
  • 11,367
  • 10
  • 77
  • 114
  • 2
    Use the `component` helper: `{{#component item.componentName key1=value1 key2=value2}}...{{/component}}` – spectras Jan 18 '16 at 03:58
  • cool Thanks :) Please add an answer so I can mark this question as resolved. – Charles Jan 18 '16 at 08:57
  • Resolved as duplicate ^^ Doesn't matter, I had just dropped a line as a quick hint before I had to go, took me 15s. – spectras Jan 18 '16 at 14:13

0 Answers0