Muut Archive Legend
@Muut · Joined 9 years ago · 18337 posts · 3878 topics · 137 reputation
Badges
Recent posts
-
Access Childpage Index in Collection Loop
· 10 years ago
If I'm looping through a collection of modular pages, how can I access the index of the child page in the collection array from the modular template? The loop in page.html.twig {% for childpage in
-
Get content from sub folder
· 10 years ago
cool, glad it worked out. FYI per the link in my post above, its not page.children.find but rather page.find('/blog').children. Which would return an array of page objects for all the pages that are c
-
Get content from sub folder
· 10 years ago
Hi yeah sure, good point. This is probably the wrong way to do it and probably terrible for performance but it works: {% set slider = page.find('/home/slider') %} {{ slider.content }} {% for image in
-
Get content from sub folder
· 10 years ago
For everyone else on this Forum to learn from it is interesting to see exactly what worked for you. Could you tell us that? Thanks.
-
Get content from sub folder
· 10 years ago
Thanks all, I worked it out from your examples. You rock.
-
Get content from sub folder
· 10 years ago
not sure, but you can iterate over the children of a particular page like this https://learn.getgrav.org/cookbook/twig-recipes#solution also if you are talking about the children pages of the current
-
Get content from sub folder
· 10 years ago
Is page.find scope-limited to start at the top level? I don't have access to my local dev env, but I imagine you could combine find with page.children to access a specific folder below the current pag
-
Get content from sub folder
· 10 years ago
This little snippet {% set p=page.find('/pages/footer') %} {{ p.content }} from this thread may help https://getgrav.org/forum#!/general:modular-as-footer-text
-
Get content from sub folder
· 10 years ago
Is there a way to get content from a sub folder NOT using the modular functionality? So, for example: This grabs and loops all images within the folder: {% for image in page.media.images %} {{ imag
-
Possible to override admin template?
· 10 years ago
You can't currently change the theme. You could fork the Admin plugin and apply your changes, then keep your fork up to date with the default Admin.