Revel中的模板布局

Is it possible to use template layouts in Revel. For example have a root.html which contains a {{define "main"}}{{end}} tag. Then call ExecuteTemplate(out, "main", nil) http://golang.org/pkg/html/template/#Template.ExecuteTemplate

Something like c.RenderLayout()

You can define the do you want into conf/routes file. Then you can call you action with the name you want:

package controllers
import (
  "github.com/revel/revel"
)
func (c Name) root() revel.Result {
c.Render()
}

views/Name/root.html

Other way can be this:

views/Controler/NameAction.html

{{template "root.html" .}}

views/root.html

<p>bla, bla</p>