aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--template.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/template.go b/template.go
index dfb9a97..97a356c 100644
--- a/template.go
+++ b/template.go
@@ -14,6 +14,8 @@ const themesDir = "themes"
// GlobalRenderData contains data available in all templates.
type GlobalRenderData struct {
+ Path string
+
LoggedIn bool
// if logged in
@@ -70,6 +72,8 @@ func NewBaseRenderData(ctx *Context) *BaseRenderData {
global.Username = ctx.Session.username
}
+ global.Path = ctx.Request().URL.String()
+
return &BaseRenderData{
GlobalData: global,
Extra: make(map[string]interface{}),