Skip to content
Grav 2.0 is officially stable. Read the announcement →

Muut Archive Legend

@Muut · Joined 9 years ago · 18337 posts · 3878 topics · 137 reputation

Badges

✏️ First Post 💬 Conversation Starter ❤️ Well Liked

Recent posts

  • How to change language slug when changing language? · 10 years ago

    Perhaps I'm just not understanding the concern, but this is not that complicated. You simply create multiple page files with different language codes. Grav sees the translation is available. It's triv

  • How to change language slug when changing language? · 10 years ago

    what you can do is to have different folder structure /blog/hello and blog/bonjour and have visible: false published: false setting for documents in the languages that are not available in a particula

  • How to change language slug when changing language? · 10 years ago

    it's complicated ... see this

  • How to change language slug when changing language? · 10 years ago

    Normally you use the built-in multi-language features. So your URL would be /en/blog/hello (or /blog/en/hello depending on your folder structure) for English and /fr/blog/hello for French.

  • How to change language slug when changing language? · 10 years ago

    Let's say I'm on page http://mysite.com/blog/hello I want to click a link to change site language and be redirected to: http://mysite.com/blog/bonjour The french example in this case would use slug: b

  • Dynamic variable in page · 10 years ago

    That was it! I had it the wrong way before and that's why it didn't work. Thanks a lot!

  • Dynamic variable in page · 10 years ago

    You just have to enable twig in the page and then use the variable as usual.

  • Dynamic variable in page · 10 years ago

    I've managed to make my theme generate a variable which is accessible in the templates with $this->grav['twig']->twig_vars['variable'] = $data; and using it like {{ variable }} but I have not be

  • Dynamic variable in page · 10 years ago

    Hi, Thanks for your answer, I will check on the links. But please not that I need to pass this variable to the page content (.md file), not to the template, so I can add it to the front matter of the

  • Dynamic variable in page · 10 years ago

    It depends on when the API is called. If the call happens in a template, you can pass it to other templates with the with keyword. If the call happens in a plugin, checkout out the Learning by Example