Skip to content
Grav 2.0 is officially stable. Read the announcement →
Themes & Styling

How can i list the content of a directory using grav?

Solved by Ole Vik View solution

Started by byache 6 years ago · 4 replies · 753 views
6 years ago

Hello,
Could somebody show me how I can list the content of a directory using grav ?
Thank you !

6 years ago

@pzul, Where is the directory located in the tree and what are you looking for inside the directory?

6 years ago

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.

6 years ago Solution

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.

6 years ago

Thank you for your answers. I just take a look and it's what I need.

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by stuart young, 2 weeks ago
3 251 2 weeks ago
Themes & Styling · by Sebadamus, 3 weeks ago
5 317 3 weeks ago
Themes & Styling · by martynfoster735, 4 weeks ago
1 310 4 weeks ago
Themes & Styling · by Justin Young, 1 month ago
1 348 1 month ago
Themes & Styling · by Slebeig, 2 months ago
4 474 2 months ago