W
W
wowastrom2019-07-02 04:03:42
Twig
wowastrom, 2019-07-02 04:03:42

How to scan a folder using a twig file?

Hello
The goal is this, I need to scan a folder, find all the files in it - pictures and display them. The question is how to do it using twig ?
I searched how to do this and they say that I need to call the php file in twig but I don't know how to do it.
Plus, it seems to me that you can try to use some js for this and then pass the parameters.
The question is how to do it and if possible with a link or an example.
Sincerely, Vladimir Stromov

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2019-07-02
@wowastrom

this is done in a puff, an array with the found pictures is simply transferred to the twig and displayed.
you can, of course, file an extension for twig, but there is little point in this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question