Muut Archive Legend
@Muut · Joined 9 years ago · 18337 posts · 3878 topics · 137 reputation
Badges
Recent posts
-
Media in Twig template
· 12 years ago
Thank you! This is very helpful. I spent a couple hours trying to get the docs to work... Really enjoying Grav though -- hits the sweet spot for me.
-
Media in Twig template
· 12 years ago
I will go back and review/update the docs, it seems they are in error. You can easily create an arbitrary image folder such as user/pages/static-images and then you can access it's media via something
-
Media in Twig template
· 12 years ago
...and then when I do it the way you suggest, resize isn't working per the docs, e.g.: {{ page.media['cameraartscover.jpg'].resize(300,364,background='0x262626').url }}
-
Media in Twig template
· 12 years ago
Oh! Thanks. I was following the docs at http://learn.getgrav.org/content/media which just have {{ media... Also, is there no way to resize and cache an arbitrary image? Nothing like {{ media['/static/
-
Media in Twig template
· 12 years ago
Ok, first thing is you should use {{ page.media... }}, not `{{ media... }} Maybe yours was a typo, if so... Second thing, and maybe a silly one, but are you sure you have a file called sample-image.jp
-
Media in Twig template
· 12 years ago
P.S. I'm running the latest version, 0.96.
-
Media in Twig template
· 12 years ago
It seems like no matter what I do (and how I adjust the paths), I can't get {{ media['sample-image.jpg'].cropZoom(300, 200).html() }} to work in my Twig templates. Any idea what could be wrong?
-
Blog as root folder, blog categories serving news/cal etc.?
· 12 years ago
Thanks!
-
Blog as root folder, blog categories serving news/cal etc.?
· 12 years ago
hi. i am now successfully running two blogs side by side. everything fine. more than fine. there is just one limitation as far as i can say: things go strange when i set one of the two blogs as home /
-
Blog as root folder, blog categories serving news/cal etc.?
· 12 years ago
There's nothing really limiting how many blogs you run on a site. To Grav a blog is merely a collection of pages, and there are no restrictions on your folder structure, so it's possible.