XF 2.2 Get an array in template


Well-known member
Hi guys,

i have some data to display in the template, but i couldn't get the data from the array. Can someone give me a hint?

If i set a dump() i got these vars. But i didn't get the data in foreach.

{{ dump(vars()) }}
<div class="block">
    <div class="block-container">
        <div class="block-body">
                {$movie.title} <br>
                {$movie.overview} <br>
                {$movie.releaseDate} <br>
                {$movie.revenue} <br>
                {$movie.budget} <br>
                {$movie.runtime} <br>
                {$movie.homepage} <br>
            <xf:foreach loop="$movie.videos" value="$videos">
                {{ dump($videos) }}
                <xf:foreach loop="$videos" value="$video">


  • Bildschirmfoto 2022-10-19 um 20.08.25.png
    Bildschirmfoto 2022-10-19 um 20.08.25.png
    95.5 KB · Views: 14
  • Bildschirmfoto 2022-10-19 um 20.10.12.png
    Bildschirmfoto 2022-10-19 um 20.10.12.png
    98.7 KB · Views: 14
The syntax is this:

<xf:foreach loop="$var" value="$thing">

You already have the content with the first foreach.
Then you just extract it in the normal way.

On mobile due to Spectrum blocking my docsis 3.0 router so it's a bit difficult to type/post.
Top Bottom