Different Partials for different pages?

Hi, Is this possible to use different partials for different pages? Say for example I want to use one partial for homepage and another partial for about us page, another partial for contact page from the baseof. So, In the baseof I want to set those partials. So, when about us page is displaying it will show the partials that are coded for only about us page.

{{ if .IsHome }}
  {{ partial "a.html" . }}
{{ else if eq .Title "About" }}
  {{ partial "b.html" . }}
{{ else if eq .Title "Contact" }}
  {{ partial "c.html" . }}
{{ end }}
3 Likes

Thanks. It works perfectly for me.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.