Reusability and passing data to ejs includes/partials

I'm not sure why you guys are doing so difficult as data bindings in partials as parameters are already available. So there is no need to hand code this.

It works just like the rest of the Server Side Data Bindings in NodeJS:

So you just:

  1. Define a input data for your partial by using "Define Template Data" on its root node:

  2. Then when using this partial - just enter its data in the properties inspector:
    image

  3. in the partial itself you can just bind the parameters, by selecting a text place and:
    image
    image

That's all!

2 Likes