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"}}
- + {{.Text}}
{{end}} \ No newline at end of file diff --git a/templates/pages/about.gohtml b/templates/pages/about.gohtml index 1b0ab7d..b3cd38c 100644 --- a/templates/pages/about.gohtml +++ b/templates/pages/about.gohtml @@ -1,3 +1,43 @@ {{define "content"}}

{{.Data}}

+
+
+ +
+
pictures
+
music
+
videos
+
documents
+
+ +
+ + + + + + + + + + + + + + + + +
#Text Feild 1Remove
+
{{end}} \ No newline at end of file diff --git a/templates/pages/home.gohtml b/templates/pages/home.gohtml index 9490ad8..2ae015a 100644 --- a/templates/pages/home.gohtml +++ b/templates/pages/home.gohtml @@ -11,9 +11,6 @@ {{end}} {{define "top-content"}} - Hello homepage -

Gopher

-

Recent posts

@@ -62,7 +59,7 @@

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.