🏠 PlatformOS Examples

Simple include

This is first partial
This is second partial

Local variable using with

{"maker":"Honda","model":"CRX"}

Iterating over collection using for

{"maker":"Honda","model":"CRX"}{"maker":"Subaru","model":"Forester"}{"maker":"Lexus","model":"LFA"}

Private variables and exporting them

Demonstration

Variable used below is defined inside a partial included below, but not exported.
This means we cannot use it here directly.
This is empty:


    

Exporting variable

This time variable is exported from partial above. Because of that we can use context.exports to get its value - in this case, a hash.
Car: {"honda":{"maker":"Honda","model":"CRX","year":"1991"}}

My car maker: Honda