1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-30 12:24:14 +00:00

Add TplPrefix to TplName also.

This commit is contained in:
saturn4er 2016-07-14 11:48:49 +03:00
parent fee06a23bd
commit 0943ef9e74

View File

@ -227,9 +227,9 @@ func (c *Controller) renderTemplate() (bytes.Buffer, error) {
var buf bytes.Buffer var buf bytes.Buffer
if c.TplName == "" { if c.TplName == "" {
c.TplName = strings.ToLower(c.controllerName) + "/" + strings.ToLower(c.actionName) + "." + c.TplExt c.TplName = strings.ToLower(c.controllerName) + "/" + strings.ToLower(c.actionName) + "." + c.TplExt
if c.TplPrefix != "" { }
c.TplName = c.TplPrefix + c.TplName if c.TplPrefix != "" {
} c.TplName = c.TplPrefix + c.TplName
} }
if BConfig.RunMode == DEV { if BConfig.RunMode == DEV {
buildFiles := []string{c.TplName} buildFiles := []string{c.TplName}