Hi phi,
thanks for your hints, but sadly it does not get me further.
Does your /images
folder actually represent a page (does it have a .md
file)?
No, it doesn’t. I’d like to use the folder to place my pictures all together in one folder instead of a decentralized placement all over different folders. That makes it much more easier to keep an eye on them and benefits structured assets.
I hope I did it right to change your code to
{{ dump( pages.find('/images') ) }}
{{ dump( pages.find('/images').media['secondpicture.jpg'] ) }}
Sorry if that is kind of noob, but I justed started to get into GRAV.
Well, nothing happend, even when I put
{{ dump(page.header) }}
{{ dump('i am just a string') }}
into the default.de.md-file to avoid issues with wrong paths. The complete code is
---
title: Testpage
published: true
process:
markdown: true
twig: true
---
#Testpage
{{ dump(page.header) }}
{{ dump('i am just a string') }}
{{ dump( pages.find('/images') ) }}
{{ dump( pages.find('/images').media['secondpicture.jpg'] ) }}
Lorem ipsum.
Well, the headline and Lorem ipsum is shown in frontend but nothing in between, even no markup - so I still don’t have ideas to make it work.
Some more information to dig the reason for my problem: I set up the standard GRAV installation with admin plugin (1.6.28) on localhost using xampp with php 7.3, just followed the instructions and checked the possibilities of learn.getgrav.org till chapter 2.
The debugger in frontend just says:
- Grav v1.6.28 | info
- Environment Name: localhost | info
- Cache: [false] Setting: [auto] Driver: [file] | info
- Routed to page /test (type: default) | info
- {#251 +“title”: “Testseite” +“published”: true +“process”: array:2 [ “markdown” => true … | debug
- i am just a string | debug
- null
- null
Okay - “dump” seems not to be meant to show anything in frontend, is it? Seems to me it is just meant to be used via debugger? So “null” means at least there is nothing found and there might be a path based issue?
Sorry for my long post.
Need some more help…