Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
P. Fighter Member
@punchfighter · Joined 8 years ago · 41 posts · 24 topics · 1 reputation
Badges
Recent posts
-
Suddenly when I try to upload an image, I get an error
· 8 years ago
I get the error Undefined property: stdClass::$image when uploading an image to a page template. The image specific blueprint is here: header.image: type: file label: S
-
The best way to provide site-wide data?
· 8 years ago
Hi, I have a bunch of header data in my home template which I need to use in the content of other templates. It's fairly trivial to use page.find within their Twig markup to locate the home page and f
-
Cannot add array entry in page template
· 8 years ago
Turns out the problem was that I had removed the jQuery asset collection in system.yaml, causing the admin panel to simply fail loading jQuery.
-
Cannot add array entry in page template
· 8 years ago
I've added an array field to a page blueprint, every time I try to add a key/value pair I get a 'Validation failed' error. I also cannot add additional fields to the array when editing the page, befor
-
Fetching all pages with taxonomy in plugin
· 8 years ago
I'm trying to iterate through all pages with a specific tag. Right now, my code looks like this: $pages = \Grav\Common\Grav::instance()['taxonomy']; $pages = $pages->findTaxonomy(['tag']); The doc
-
Ordering pages by custom header variable in Twig
· 8 years ago
No cigar. Also, it's a string in the docs. - This couldn't possibly refer to the variable in the fetched pages as it would represent a variable itself, even if it's not declared (then we'd just pass n
-
Extending Twig in theme PHP file
· 8 years ago
Would it be possible to add functions to Twig within the theme PHP file (IE: antimatter.php)?
-
Ordering pages by custom header variable in Twig
· 8 years ago
Example: I want to find all pages with the tag foobar, but I want to order them alphabetically based on a custom header variable. Right off the bat, my first try would be the following: {% for page in
-
Type: taxonomy field doesn't read current values
· 8 years ago
Exactly right. Editors can't possibly know all current tags in use, so the field needs to autofill them.
-
Type: taxonomy field doesn't read current values
· 8 years ago
Well, that works, but it doesn't autofill the existing tags which is somewhat important as I can't expect the end user to remember them all (there are quite a few)...