# Accessing page resources by name?

**URL:** <https://discourse.gohugo.io/t/accessing-page-resources-by-name/15228>\
**Category:** support\
**Created:** [November 10, 2018, 9:16pm UTC](https://discourse.gohugo.io/t/accessing-page-resources-by-name/15228 "2018-11-10T21:16:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![JamesTheHacker](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jamesthehacker/32/6919_2.png) [@JamesTheHacker](https://discourse.gohugo.io/u/JamesTheHacker)\
**Post date:** [November 10, 2018, 9:23pm UTC](https://discourse.gohugo.io/t/accessing-page-resources-by-name/15228/3 "2018-11-10T21:23:54Z")

</div>

Ooooh yes because the `.` is the `range` context. I totally missed that. I need to put in some time to learn Go properly.

For anyone who has a similar problem here’s my complete working solution:

```
{{ with .Site.GetPage "accreditations/index.md" }}
{{ $resources := .Resources }}
<div class="uk-section">
  <h2>{{ .Title }}</h2>
  {{ with .Content }}
  <p class="summary">{{- . -}}</p>
  {{ end }}

  <ul class="uk-grid-small uk-child-width-expand@s uk-text-center" uk-grid>
    {{ range .Params.accreditations }}
    <li>
      {{ with $resources.GetMatch (.image) }}
      <img src="{{ .Permalink }}">
      {{ end }}
      <h3>{{ .title }}</h3>
      <p>{{ .number }}</p>
    </li>
    {{ end }}
  </ul>
</div>
{{ end }}
```

---

_[View the full topic](https://discourse.gohugo.io/t/accessing-page-resources-by-name/15228)._
