Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Heiko Haller Newcomer
@reboom · Joined 7 years ago · 7 posts · 0 topics · 0 reputation
Badges
Recent posts
-
How to get the slug url using the LangSwitcher plugin?
· 3 years ago
Hi @msa , I'm sorry, I can't help you anymore. I'm no longer involved in this project and it's 4 years ago. I don't know if my solution still works with the current version of grav.
-
How to get the slug url using the LangSwitcher plugin?
· 7 years ago
@reboom: Since most of the config and classes are frozen once a request is handled by Grav there is no chance to retrieve the language specific slugged URLs dynamically. But I did a workaround. I post
-
How to get the slug url using the LangSwitcher plugin?
· 7 years ago
@pamtbaau I improved my solution again. Now the cache will be updated instantly on saving an altered (or newly created) page. Of course this is only possible if one is using the built in editor. The m
-
How to get the slug url using the LangSwitcher plugin?
· 7 years ago
@pamtbaau My solution was built for my specific needs, too ;) You're right, as long as at least one request for a language has been handled (and no changes have been made) the slugs are correct. If af
-
How to get the slug url using the LangSwitcher plugin?
· 7 years ago
I modified my solution a little bit (improved caching/performance if slugs didn't change when pages where modified plus renaming some variables). Thanks @pamtbaau for the inspiration to refactor my so
-
How to get the slug url using the LangSwitcher plugin?
· 7 years ago
Hi @pamtbaau, thanks for your reply. Yes, this works fine even for slugs used in the path. Other solutions focus on the slug for the last part of the URL and ignore the slugs for the path itself (rely
-
Multilanguage site: title and description for two languages
· 7 years ago
A first shot would be to use language specific constants. You have to create a 'languages' folder in 'user' (user/languages). Then create a yaml-file for each language you want to support, e.g. en.yam