7

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!

Patrick
  • 7,903
  • 11
  • 52
  • 87

1 Answers1

2

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

Pavan Kumar Sunkara
  • 3,025
  • 21
  • 30