I just started looking at plates, as many people are talking about it.
There are some examples for plates with little html snippets, but not really a full-blown template file. So I am wondering how I can separate especially the layout into a layout.html file and the content distributed into several content.html files?
Also, I'd like to know if there are some strategies for multi-language-sites in flatiron.js/plates?
Thanks!
You can do the seperation pretty easily. You can write a function which binds given string into a layout. Now all you need to do is form the string using plates.bind (this is the content) and pass it to that function which uses plates.bind on the layout.html
Example: https://github.com/flatiron/flatiron/blob/scaffolding/lib/flatiron/plugins/plates.js#L64-66
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With