I’m working on a blog which will contain multi-language articles (some in French, others in Italian or German). They will be tagged with an internal tag like #fr, #it, #de, etc.
On the front page of the blog, I’d like to retrieve and display only posts that have a the tag that matches the blog locale (set in the admin panel) ; I intend to have three instances of Ghost on my server, each of them having the locale set to one of the three languages.
For example, if I set the blog locale to fr, I want the posts that have the #fr tag.
I tried the following to do that (note the first line):
And… this doesn’t work. Sadly.
I understand, thanks to the syntax highlighting here on the forum, that it’s because the {{lang}} in the filter string seems to be interpreted as a string, not as a handlebar helper. Thus, the filter tries to retrieve posts with the #{{lang}} tag.
Is there any way to do what I want to achieve? What would be a workaround?
Just eyeballing it, I’d say start with trying {{../lang}} or {{../../lang}} to see if that lets you get there. Just a guess though, I haven’t tried this specific case before :)