view icon indicating copy to clipboard operation
view copied to clipboard

Inline templates

Open cllns opened this issue 10 months ago • 0 comments

Do we want to add support for inline templates? That is, templates that are defined as strings in the View class, and not in a separate file to be read. I think it'd be helpful, and we could also simplify the configuration by not requiring paths

What should the API look like?

  • Override def template and returns a string?
  • Add a template DSL which takes a string?
  • Put at the end of the file after END, then use DATA to access it? (A strange idea surely, and could be implemented via the other two if someone wanted to)

Similarly, would we want to allow layouts to be defined inline? I imagine it would be defined in a local base class, and inherited by the children.

cllns avatar Feb 21 '25 18:02 cllns