mirror of
https://github.com/knadh/listmonk.git
synced 2024-11-10 09:02:36 +08:00
👌 IMPROVE: make RootURL available in email templates (#1812)
Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
This commit is contained in:
parent
c48fe973e2
commit
1d32d4c368
2 changed files with 5 additions and 0 deletions
|
@ -472,6 +472,7 @@ func initCampaignManager(q *models.Queries, cs *constants, app *App) *manager.Ma
|
|||
ViewTrackURL: cs.ViewTrackURL,
|
||||
MessageURL: cs.MessageURL,
|
||||
ArchiveURL: cs.ArchiveURL,
|
||||
RootURL: cs.RootURL,
|
||||
UnsubHeader: ko.Bool("privacy.unsubscribe_header"),
|
||||
SlidingWindow: ko.Bool("app.message_sliding_window"),
|
||||
SlidingWindowDuration: ko.Duration("app.message_sliding_window_duration"),
|
||||
|
|
|
@ -124,6 +124,7 @@ type Config struct {
|
|||
MessageURL string
|
||||
ViewTrackURL string
|
||||
ArchiveURL string
|
||||
RootURL string
|
||||
UnsubHeader bool
|
||||
|
||||
// Interval to scan the DB for active campaign checkpoints.
|
||||
|
@ -353,6 +354,9 @@ func (m *Manager) TemplateFuncs(c *models.Campaign) template.FuncMap {
|
|||
"ArchiveURL": func() string {
|
||||
return m.cfg.ArchiveURL
|
||||
},
|
||||
"RootURL": func() string {
|
||||
return m.cfg.RootURL
|
||||
}
|
||||
}
|
||||
|
||||
for k, v := range m.tplFuncs {
|
||||
|
|
Loading…
Reference in a new issue