We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Access current site/localization when extending Bard

Florian September 26, 2020 by Florian

I extended Bard with a button very similar to the link button. When clicked, I want to make a request to fetch some collection entries.

This works fine so far. But for the request to return only results in the current language, I have to add the [site] parameter to the GET request. How can I get the current site handle in my Vue component?

I was able to get the selected site using Statamic.$config.get('selectedSite'), but this is not the current languange I'm editing in the Editor (but the site selected in the top CP dropdown).

>>>>>>> Unanswered <<<<<<<
0 Replies
1 Follower