Muut Archive Legend
@Muut · Joined 9 years ago · 18337 posts · 3878 topics · 137 reputation
Badges
Recent posts
-
Not quite understanding deployment
· 11 years ago
Hello. I'm new here, and considering switching my website from Octopress to Grav. One thing I am really not understanding is deployment. If I install Grav locally on my Mac, can I just deploy the resu
-
Multi-line strings in frontmatter?
· 11 years ago
Hi @dimis, I think the multiline string is working, but the problem lies on the Twig end how you print out the variable. By default web browsers are whitespace/newlines agnostic, meaning you have to c
-
Multi-line strings in frontmatter?
· 11 years ago
To clarify, what I meant was that the /n is a line break so that's correct, but the parser isn't parsing it into a new line for some reason in the front-end.
-
Multi-line strings in frontmatter?
· 11 years ago
Guess I'll have to try that. It might be the parser. Whenever I save the document, this... description: | here's a looong description which spans multiple lines third li
-
Multi-line strings in frontmatter?
· 11 years ago
To be honest i'm not sure. If it doesn't work then it's an issue with the Symfony YAML parser: https://github.com/symfony/symfony/issues/12095 (maybe this issue?) You could try installing the PECL ya
-
Multi-line strings in frontmatter?
· 11 years ago
I have a few items in my frontmatter which have long descriptions. I'd like to add line breaks to the descriptions instead of it being one long string. How is this done? Adding <br /> works but
-
Dynamic global variable
· 11 years ago
Not included? You mean they are not in the same process? If so none of these will work. You can't set a variable at runtime from a twig template. These do not persist back to the filesystem or cac
-
Dynamic global variable
· 11 years ago
Thanks rhukster In the first template, I try : {% set site = {'my_custom_var':'foo'}|merge(site) %} or {% set site = site | merge ({'my_custom_var':'foo'}) %} so <h1>{{ site.my_custom_var }}<
-
Dynamic global variable
· 11 years ago
Yes, you can set a variable in the site object then use it later. In the first Twig template do something like this: {% set site = {'my_custom_var':'foo'}|merge(site) %} Then in the other template you
-
Dynamic global variable
· 11 years ago
thanks iusvar, in your suggestion, you have to include first template in a second one. Is there another way without any link between the 2 templates ?