Question: Hi everybody out there,

I have configured my page template so that I can create FAL relations. I'm able to read the data of the current page and spit out the image.

But what I really want is that I can slide up - if there is no FAL relation at the current page then I would like to look in the parent page for an image - and the parents parent page if the parent itself have no FAL relation (and so on - until I'm at the root page).

After reading the documentation something like this is possible with content, but I can not find any hints how to do this with page resources.

Hopefully someone can help

Markus

Answer: 
You can use the vhs viewhelper [v:page.resource](https://fluidtypo3.org/viewhelpers/vhs/2.3.3/Page/Resources/FalViewHelper.html#argument-slide) in combination with the slide argument, wich is supported from vhs version 2.3.3.

```
{namespace v=FluidTYPO3\Vhs\ViewHelpers}

<v:page.resources.fal table="pages" field="media" uid="{page.uid}" as="images" slide="-1" >
  <f:for each="{images}" as="image">
    <f:image src="{image.url}" alt="{image.alternative} {image.name}" title="{image.title}" />
  </f:for>
</v:page.resources.fal>

```

Inline-syntax-example for the first element

```
<v:resource.image identifier="{v:page.resources.fal(field: 'media', uid: '{page.uid}' slide:'-1') -> v:iterator.extract(key: 'id') -> v:iterator.first()}" treatIdAsReference="1" maxWidth="1500"/>

```
For `TYPO3 8.7` you have to use TypoScript, `vhs` with `v:page.resources.fal` is not working anymore ([issue](https://github.com/FluidTYPO3/vhs/issues/1520)) - in my case. See example from N1ck above.

I use a Subpage-Sitemap with images from page properties (media/resources).

FLUID:

```
<f:if condition="{menu}">
    <ul class="ce-menu ce-menu-1">
        <f:for each="{menu}" as="page">
            <li>
                <a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}">
                    <f:format.raw>{page.title}</f:format.raw>
                    <f:cObject typoscriptObjectPath="lib.mediaResources" data="{uid:'{page.data.uid}'}" />
                </a>
            </li>
        </f:for>
    </ul>
</f:if>

```

TypoScript:

```
lib.mediaResources = FILES
lib.mediaResources {
    references {
      table = pages
      #Seiten-ID ubergabe
      uid.dataWrap= {field:uid}
      fieldName = media
    }
    renderObj = IMAGE
    renderObj {
      file.width = 50c
      file.height = 50c
      file.import.data = file:current:uid
      file.crop.data = file:current:crop
      file.treatIdAsReference = 1
      altText.data = file:current:title
      params = class="ce-menu-1-image"
      wrap = |
    }
}

```

Works perfect, without vhs-Extension. A solution with FLUID would be nice.