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.

Robert Member

@metbril · Joined 8 years ago · 49 posts · 11 topics · 3 reputation

Badges

✏️ First Post 💬 Conversation Starter

Recent posts

  • Add file to page with plugin · 7 years ago

    I want to add a static image file to a page programmatically. I have tried using the onPageProcessed and onPageContentRaw events. Using any of the events, I am able to save the file to the folder usi

  • Iterate pages with CLI command · 7 years ago

    Full code of my CLI Command ScanCommand.php <?php namespace Grav\Plugin\Console; use Grav\Common\Grav; use Grav\Common\Page\Page; use Grav\Common\Page\Pages; use Grav\Console\ConsoleCommand; use S

  • Iterate pages with CLI command · 7 years ago

    This thread started in the discord dev channel with @OleVik. It seems similar to this thread: /forum/archive/access-page-routes-from-cli-t9183 I want to loop through pages in a CLI command. How shoul

  • Access image meta.yaml for Alt in markdown? · 7 years ago

    The OP has not explained how he is using the images and if they need to be in the generated page or in a specific place inside the (markdown) content. If the former, than adding it to the template is

  • Access image meta.yaml for Alt in markdown? · 7 years ago

    Instead of adding the twig to every page and enable twig in the frontmatter, you could also consider adding processing the images inside your page template. More or less like is done with the hero ima

  • Import your own Menu? · 7 years ago

    Menus in Grav are typically generated from a page structure. What does your menu do? Simply open specific pages? You should have a look at the Quark or Antimatter themes to see how it's done.

  • Caching implications for nicetime twig function · 7 years ago

    I will do this when I have access to the filesystem and can do a 'grep'.

  • Caching implications for nicetime twig function · 7 years ago

    I found and like the twig function nicetime to be used with my blog item template. https://learn.getgrav.org/themes/twig-filters-functions#nice-time However, I guess that since this value needs to be

  • Dynamically add taxonomy to header · 7 years ago

    This solved my problem. The only dowside of using onPageProcessed is, that the event is triggered for every page update and processes all available pages. This will probably slow things down a little.

  • Access image meta.yaml for Alt in markdown? · 7 years ago

    The documentation has an example. https://learn.getgrav.org/content/media#metafiles {{ page.media['sample-image.jpg'].meta.alt_text }}