working in configuration data and replacing values in frame template
This commit is contained in:
@@ -28,6 +28,11 @@ func AmWrap(myfunc func(AmContext) (string, any, error)) echo.HandlerFunc {
|
||||
default:
|
||||
err = fmt.Errorf("unknown rendering type: %s", what)
|
||||
}
|
||||
if err != nil {
|
||||
ctxt.Logger().Error("Rendering error: %v", err)
|
||||
}
|
||||
} else {
|
||||
ctxt.Logger().Error("Page function error: %v", err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ package ui
|
||||
import (
|
||||
"io"
|
||||
|
||||
"git.erbosoft.com/amy/amsterdam/config"
|
||||
"github.com/CloudyKit/jet/v6"
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
@@ -20,6 +21,10 @@ var views = jet.NewSet(
|
||||
jet.DevelopmentMode(true),
|
||||
)
|
||||
|
||||
func init() {
|
||||
views.AddGlobal("GlobalConfig", config.GlobalConfig)
|
||||
}
|
||||
|
||||
type TemplateRenderer struct {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user