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

Implementing the templates

When rendering the Contact page from the server-side, we will use the contact_page template (found in the shared/templates/contact_page.tmpl file):

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

Recall that because we include the layouts/webpage_layout template, and this will print the markup that generates the doctype, html, and body tags of the page. This template will be used exclusively on the server-side.

Using the define template action, we demarcate the "pagecontent" block, where the content of the contact page will be rendered. The content of the contact page is defined inside the contact_content template (found in the shared/template/contact_content.tmpl ...

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