How Can I Render the Same Handlebar Template for Multiple Data Models #229
-
I have one template "page.hbs" which is a handlebar template. Thus, my /input folder contains:
Now I need to render this template multiple times with a list of different input data (which is present as a List. My /output folder would thus look like the following:
I have seen the EnumerateValues class but could not figure out how to use that along with a List and Handlebar rendering. Can you help me build a pipeline that would acomplish this task? Thanks and regards, EDIT: this is where I am starting from (1:1 rendering from one .hbs template to one .html file)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This is a simplified version of what we are using to develop a static ecommerce site. It uses the following steps.
The following should give you enough to create the workflow for your specific situation. Not sure if there is a simpler way, but this is what we have come up with and it is working well. Simple data model
1. Module for creating documents with data
2. Pipeline for loading data
3. Pipeline to generate html files
|
Beta Was this translation helpful? Give feedback.
This is a simplified version of what we are using to develop a static ecommerce site. It uses the following steps.
The following should give you enough to create the workflow for your specific situation. Not sure if there is a simpler way, but this is what we have come up with and it is working well.
Simple data model
1. Module for creating documents with data