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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

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

Solved by Ole Vik View solution

Started by byache 5 years ago · 4 replies · 625 views
5 years ago

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

5 years ago

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

5 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.

5 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.

5 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 Pedro M, 2 months ago
4 196 2 months ago
Themes & Styling · by Ian, 2 months ago
3 92 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 452 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 46 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 126 3 months ago