# Display a custom list of pages inside the panel view of a file

**URL:** <https://forum.getkirby.com/t/display-a-custom-list-of-pages-inside-the-panel-view-of-a-file/34869>\
**Category:** Questions\
**Tags:** v5\
**Created:** [October 16, 2025, 2:09pm UTC](https://forum.getkirby.com/t/display-a-custom-list-of-pages-inside-the-panel-view-of-a-file/34869 "2025-10-16T14:09:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lkssmnt](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lkssmnt](https://forum.getkirby.com/u/lkssmnt)\
**Post date:** [October 16, 2025, 2:09pm UTC](https://forum.getkirby.com/t/display-a-custom-list-of-pages-inside-the-panel-view-of-a-file/34869/1 "2025-10-16T14:09:56Z")

</div>

Hi!

I’m using a downloads page to centrally store some documents. I want to display all pages where a specific file is referenced inside the file view. For this I created a fileMethod:

```php
Kirby::plugin('lkssmnt/file-methods', [
  'fileMethods' => [
    'usedInPages' => function () {
      $kirby = kirby();
      $pages = $kirby->site()->index();

      $found = [];

      foreach ($pages as $page) {
        if($page->sidebarBlocks()->isNotEmpty()) {
          foreach($page->sidebarBlocks()->toBlocks()->filterBy("type", "downloads") as $block) {
            if($block->downloads()->isNotEmpty()) {
              foreach($block->downloads()->toStructure() as $download) {
                if($download->file()->isNotEmpty() && $download->file() != null) {
                  if($download->file()->toFile()->uuid()->id() === $this->uuid()->id()) {
                    $found[] = $page;
                  }
                }
              }
            }
          }
        }
      }

      return new Kirby\Cms\Pages($found);
    }
  ]
]);

```

But this doesnt seem to work as a field or a section:

```yaml
usedInPages:
  type: pages
  query: page.usedInPages

```

Do I need to create a custom section for this and if so is it necessary to include a Vue component, when I just want to use the standard pages component?

Or is there another much more simple approach?

Thank you!

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [October 16, 2025, 5:03pm UTC](https://forum.getkirby.com/t/display-a-custom-list-of-pages-inside-the-panel-view-of-a-file/34869/2 "2025-10-16T17:03:06Z")

</div>

If I understand correctly, you want to use a pages section inside a file blueprint? I think that is nor possible in this context. Also, you created a file method and called it on page. As an alternative, you could use an info section, see also this plugin: [Usage Reference | Kirby CMS Plugins](https://plugins.getkirby.com/visionbites/usage-reference)

---

<div class="post-metadata">

**Author:** ![lkssmnt](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lkssmnt](https://forum.getkirby.com/u/lkssmnt)\
**Post date:** [October 17, 2025, 7:52am UTC](https://forum.getkirby.com/t/display-a-custom-list-of-pages-inside-the-panel-view-of-a-file/34869/3 "2025-10-17T07:52:23Z")

</div>

Thank you texnixe, that plugin is doing all that I wanted except providing clickable links to the referenced pages. Could you help me figure out why I cannot click the links?

The items have a link property that resolves correctly but the panel renders the previews as tags and not as clickable pages I think. This is what I get as HTML in the panel:

```auto
<ul class="k-tags-field-preview k-tags k-pages-field-preview">
  <li>
    <div data-theme="light" to="/pages/informationen+studierenden-service+immatrikulation" type="button" class="k-tag">
      <figure class="k-tag-image k-frame k-icon-frame" style="--fit: contain; --back: var(--color-positive)">
        <svg aria-hidden="true" data-type="page" class="k-icon" style="color: var(--color-white)"><use xlink:href="#icon-page"></use></svg>
      </figure>
      <span class="k-tag-text">Immatrikulation</span>
    </div>
  </li>
</ul>

```

this is what the Vue component template looks like:

```auto
<template>
  <section class="k-usage-references-section">
    <header v-if="headline" class="k-section-header">
      <k-headline>{{ headline }}</k-headline>
    </header>
    <template v-if="references">
      <div class="k-table">
        <table >
          <thead>
          <tr>
            <th class="k-table-column" data-mobile="true">
              title
            </th>
            <th class="k-table-column" data-mobile="true">
              template
            </th>
            <th class="k-table-column" data-mobile="true">
              page
            </th>
          </tr>
          </thead>
          <tbody>
          <tr v-for="reference in items">
            <td class="k-table-column " data-mobile="true" style="padding-left: 0.75em">
              {{ reference.title }}
            </td>
            <td class="k-table-column" data-mobile="true" style="padding-left: 0.75em">
              {{ reference.template }}
            </td>
            <td class="k-table-column" data-mobile="true">
              <k-pages-field-preview :value="reference.preview"/>
            </td>
          </tr>
          </tbody>
        </table>
      </div>
    </template>
  </section>
</template>

```

---

<div class="post-metadata">

**Author:** ![lkssmnt](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lkssmnt](https://forum.getkirby.com/u/lkssmnt)\
**Post date:** [October 20, 2025, 8:23am UTC](https://forum.getkirby.com/t/display-a-custom-list-of-pages-inside-the-panel-view-of-a-file/34869/4 "2025-10-20T08:23:55Z")

</div>

As it seems it is expected behaviour for the k-pages-field-preview to not be clickable. Instead I just used an a tag in the Vue template to link to the referenced page for now.
