pamtbaau Legend
Grav Forum Moderators
@pamtbaau · Joined 8 years ago · 3185 posts · 17 topics · 1019 reputation
Badges
Recent posts
-
Setting a Global Variable (like a phone number)
· 8 years ago
Sorry, misread your question... The only solution I can think of is adding an onPageContentRaw event to your theme or plugin and replace a placeholder for the variable in the content of the page. If y
-
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