Adds a Cuba.settings[:render][:layout] variable.
This lets you set different layouts for different applications.
Cuba.plugin Cuba::Render
class Admins < Cuba
settings[:render][:layout] = "admins_layout"
on default do
# Now this will render the home view inside the admins_layout layout
res.write view("home", content: "hello, world")
end
end
This is useful when having a Guests and an Admin app, where you'd like to show different layouts depending on the context without needing to specify it in every view call.
Adds a Cuba.settings[:render][:layout] variable. This lets you set different layouts for different applications.
This is useful when having a Guests and an Admin app, where you'd like to show different layouts depending on the context without needing to specify it in every
view
call.