Add .IndividualTracking to public templates. Closes #1663.

This commit is contained in:
Kailash Nadh 2024-01-27 22:38:26 +05:30
parent 74ef6f5033
commit 6cb9982aac
2 changed files with 4 additions and 0 deletions

View file

@ -769,6 +769,7 @@ func initHTTPServer(app *App) *echo.Echo {
AssetVersion: app.constants.AssetVersion,
EnablePublicSubPage: app.constants.EnablePublicSubPage,
EnablePublicArchive: app.constants.EnablePublicArchive,
IndividualTracking: app.constants.Privacy.IndividualTracking,
}
// Initialize the static file server.

View file

@ -33,6 +33,7 @@ type tplRenderer struct {
AssetVersion string
EnablePublicSubPage bool
EnablePublicArchive bool
IndividualTracking bool
}
// tplData is the data container that is injected
@ -45,6 +46,7 @@ type tplData struct {
AssetVersion string
EnablePublicSubPage bool
EnablePublicArchive bool
IndividualTracking bool
Data interface{}
L *i18n.I18n
}
@ -99,6 +101,7 @@ func (t *tplRenderer) Render(w io.Writer, name string, data interface{}, c echo.
AssetVersion: t.AssetVersion,
EnablePublicSubPage: t.EnablePublicSubPage,
EnablePublicArchive: t.EnablePublicArchive,
IndividualTracking: t.IndividualTracking,
Data: data,
L: c.Get("app").(*App).i18n,
})