Hello,
Could somebody show me how I can list the content of a directory using grav ?
Thank you !
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Solved by Ole Vik View solution
@pzul, Where is the directory located in the tree and what are you looking for inside the directory?
In
user > pages
I'll have a few subdirectories which will contain md files, pdf files and odt files.
I'd like to obtain one web page for each subdirectory and in that page something related to the files it contains.
This is something that lacks direct helper-methods in Grav itself, as far as I am aware. It is relatively easy to facilitate with PHP, however. You could try something like the Directory Listing-plugin, which accommodates this.
Thank you for your answers. I just take a look and it's what I need.
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 4 | 196 | 2 months ago | ||
| 3 | 92 | 2 months ago | ||
| 11 | 452 | 3 months ago | ||
| 0 | 46 | 3 months ago | ||
| 5 | 126 | 3 months ago |