<head>
  <link rel="stylesheet" href="{{ .Site.BaseURL }}css/tilelist.css">
</head>

{{ $section := .Page.CurrentSection }}
{{ if .Get "path" }}
  {{ $path := .Get "path" }}
  {{ with ($.Site.GetPage "section" $path) }}
    {{ $section = .CurrentSection }}
  {{ end }}
{{ end }} 

<div class="tilelist">
  {{ range $section.Pages.ByWeight }}  
    {{ if .Params.mktile }}
      <a href="{{ .Permalink }}" class="tile">
        <img src="{{ $.Site.BaseURL }}{{ .Param "image" }}" alt={{ .Title }} title={{ .Title }}>
	      <div class="caption">
          <div>{{ .Title }}</div>
	      </div>
      </a>
    {{ end }}
  {{ end }}  
</div>
