diff options
Diffstat (limited to 'internal/context')
-rw-r--r-- | internal/context/context.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/context/context.go b/internal/context/context.go index 44bb6eed..b4809ec7 100644 --- a/internal/context/context.go +++ b/internal/context/context.go @@ -46,9 +46,14 @@ type Context struct { Org *Organization } -// Title sets "Title" field in template data. +// RawTitle sets the "Title" field in template data. +func (c *Context) RawTitle(title string) { + c.Data["Title"] = title +} + +// Title localizes the "Title" field in template data. func (c *Context) Title(locale string) { - c.Data["Title"] = c.Tr(locale) + c.RawTitle(c.Tr(locale)) } // PageIs sets "PageIsxxx" field in template data. |