hughbris Veteran
Regular
Grav Forum Moderators
@hughbris · Joined 9 years ago · 580 posts · 13 topics · 127 reputation
Badges
Recent posts
-
Getting one random children page using TWIG
· 8 years ago
The Twig documentation mentions the random function, which you could use to simply wrap your expression above (forget the for loop): random(page.find('/blog').children.order('date', 'desc').slice(0,5)
-
Global twig variable for page.find('/images')
· 8 years ago
So have you tried setting it in your theme's base template? I keep forgetting how scope works in Twig. I assume you have, though. Failing that, twig_vars as you mentioned will work and is the only oth
-
404 Not Found other than homepage
· 8 years ago
Please provide a lot more information if you want help with this. For example: your level of experience what you set up and the steps you took which operating environment which pages you set up (espe
-
REST API for pages
· 8 years ago
Man, this is now asked almost weekly and every thread has useful new info. I've never seen the API plugin @OleVik mentions in response, for example. I do think this should concept have a canonical hom
-
Which twig template
· 8 years ago
To find out, put code or markup in one that you know would be executed (e.g. not in an if block) if the template is used. I am pretty sure any plugin template is overridden by templates in your theme
-
The best way to provide site-wide data?
· 8 years ago
Apparently future versions of Grav (v2?) will have a feature called "content blocks" but there's nothing written about it, so not sure if that will be along the lines of what you are asking about.
-
The best way to provide site-wide data?
· 8 years ago
See also my answer to a similar question recently, where I store reusable components in subdirectories of pages/components and then the dreaded page.find()
-
How to remove label from form field
· 8 years ago
I'll add these to my (long) list of things to investigate: is label: false documented? what is causing the display of 0 when label is omitted? (theme or form plugin) should omitting the label propert
-
How to remove label from form field
· 8 years ago
This seems not to be documented: try label: false.
-
Update-safe overrides for forms fields twig templates?
· 8 years ago
Hi, put them in user/themes/<themename>/templates/forms/... and replicate the path structure you see in the default plugin templates. Are you using a child theme? If not, your theme will also be