Open beckelmw opened 13 years ago
I would like to do this in the style of tumblr: image, video, quote, text...
Basically you can provide your lambda in config:
set :to_html, lambda {|path, page, ctx| # returns an html, from a path & context
if :layout == page
# override page here
end
ERB.new(File.read("#{path}/#{page}.rhtml")).result(ctx)
}
but I'm not sure how you will "determine" when to switch over. I guess you wont' be able with current API (personally for me this feature seems useless)
Is it possible to change which layout is used like you can with Sinatra? It would be nice to be able to send a different layout to mobile browsers.