Closed fabritw closed 7 years ago
This would be nice . Right now i'm bypassing this with an if else
at the base template, but it feels like extra verbosity.
{{if url}}{{url}}{{else}}{{globals.url}}{{/if}}
We could do a deep merge of properties, where now we just overwrite everything if two keys conflict. So you could write:
globals:
url: 'signup.mysite.com'
That at least prevents us from needing to explain object path notation.
Implemented this in ae6b85352b6adf3dd1d8d1b086f0010cd2fa6823
I'm using External Data files to define global variables. In some templates, it would be very helpful to override the globals however (https://github.com/zurb/panini#data).
For example: