Closed zazena closed 12 years ago
Hi. Thanks for the suggestion. I like the idea of being able to specify a default template for a layout (or possibly a default layout for a template – is one significantly better for you than the other?).
I'll give it some thought. I'm not sure that metadata in the views/ folder is the way forward, as Sinatra is currently dealing with rendering the content of views and I'd like to avoid getting in its way. Perhaps a hash in app.rb that defined defaults would be a better approach.
Good question ... I guess there are arguments for layout-wide template or template-wide layout. Both possible? :)
A hash in app.rb or a specific section in config.yml would work I think.
I'm thinking app.rb; it could get bundled with a theme then. I'll muse on it for a bit and see what comes up.
That makes perfect sense. Thx :)
I haven't come up with an API for this that I don't feel adds complexity, rather than reducing it. I'm going to close it (at least for the moment) so I can focus on stuff in the tracker that I want to get done first.
Pseudo example for a layout:
Then in the page itself you specify the layout and have the default layout template applied. Of course the Template metadata tag could would still be useable in the page itself.