Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

pamtbaau Legend

Grav Forum Moderators

@pamtbaau · Joined 8 years ago · 3203 posts · 17 topics · 1020 reputation

Badges

Grav Core Team ModSquad Team Member ✏️ First Post 💬 Conversation Starter ❤️ Well Liked

Recent posts

  • Setting a Global Variable (like a phone number) · 8 years ago

    @polybizman Have a look at the docs on Site Configuration. Scroll down to "custom options" You can create any option you like in this file and a good example is the blog: route: '/blog' option that i

  • Create a new page from php or? · 8 years ago

    @dlannan Uhhh, do you want it all to happen inside the Admin panel? I think not, but if so, the Admin plugin has its own event hooks. You can write your own plugin and respond to, for example, the onA

  • Redirect route including language · 8 years ago

    A different approach... I've added an onPageContentRaw function to the theme. The function searches the Markdown code for the PDF and replace it by a proper <a> All pages contain the same langua

  • Redirect route including language · 8 years ago

    Just learned a word which wasn't in my vocabulary but found it in the urban dictionary...

  • Redirect route including language · 8 years ago

    That's cool @npetri I wonder, is twig that smart or has Grav added that smartness?

  • Redirect route including language · 8 years ago

    In Twig you might try '/' ~ page.language ~ '/path/to/file.pdf'

  • Working with session variables in Twig · 8 years ago

    Even if you could, should you want to change application state inside templates?

  • Redirect in new browser window · 8 years ago

    Would you mind sharing what you have tried so far? I've inserted your code inside Quark's base.html.twig and added the gist of my solution and it works fine in my use-case. NB. When you wrap your code

  • Create a new page from php or? · 8 years ago

    @dlannan Would you mind sharing what you have tried so far? You might have been on the right track and only need some finger-pointing to get you going. Folders/files, frontmatter (yaml) and content ca

  • Redirect in new browser window · 8 years ago

    @nix Yes you can use some Grav magic using the uri object The following sample is using Quark as theme and should be adapted to your own theme. In partials/navigation.html.twig, add uri as extra par