Serving files
- +
In the example posts above, check how the file URL contains a cache-buster query parameter which changes only when the app is restarted.
diff --git a/routes/about.go b/routes/about.go index b49b685..eacf534 100644 --- a/routes/about.go +++ b/routes/about.go @@ -10,14 +10,14 @@ type About struct { controller.Controller } -func (a *About) Get(c echo.Context) error { - p := controller.NewPage(c) - p.Layout = "main" - p.Name = "about" - p.Title = "About" - p.Data = "This is the about page" - p.Cache.Enabled = false - p.Cache.Tags = []string{"page_about", "page:list"} +func (c *About) Get(ctx echo.Context) error { + page := controller.NewPage(ctx) + page.Layout = "main" + page.Name = "about" + page.Title = "About" + page.Data = "The data field can take in anything you want to send to the templates" + page.Cache.Enabled = false + page.Cache.Tags = []string{"page_about", "page:list"} - return a.RenderPage(c, p) + return c.RenderPage(ctx, page) } diff --git a/templates/components/messages.gohtml b/templates/components/messages.gohtml index 81bca54..ba0dd5a 100644 --- a/templates/components/messages.gohtml +++ b/templates/components/messages.gohtml @@ -15,7 +15,7 @@ {{define "message"}}
{{.Data}}
+ + +| # | +Text Feild 1 | +Remove | +|
|---|---|---|---|
| + | + | + | |
| + | |||