O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The page template for the about page

Here's an example of the page template for the About page, from the about_page.tmpl source file in the shared/templates folder:

{{ define "pagecontent" }}{{ template "about_content" . }}{{ end }}{{ template "layouts/webpage_layout" . }}

We use the define action in the page template, to define the region of the template that contains the template section that we have declared as the pagecontent section. We have a corresponding end action to mark the end of the pagecontent section. Notice that we have a template action in between the define and end actions to include the template named about_content. Also note that we provide the dot (.) action to pass the data object to the about_content template.

This ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required