Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Twig list of users/profiles

Solved by pamtbaau View solution

Started by Nick 4 years ago · 1 replies · 532 views
4 years ago

Hi there

Is it possible to generate a list of users in Twig? I just want a list of users, grouped by Title, and including their account pictures.

Thank you

Nick

4 years ago Solution

@nick1, You'll need to create a custom plugin for that:

  • Create plugin
  • Loop through folder returned by
    $this->grav['locator']->findResource('account://', true);
  • Parse each yaml file
  • Provide array of extracted info to Twig
👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 227 9 hours ago
Support · by alex, 2 months ago
8 667 24 hours ago
Support · by Supple, 5 days ago
1 98 1 day ago
Support · by TomW, 1 week ago
3 159 3 days ago
Support · by TomW, 6 days ago
2 106 6 days ago