How to get active variant in a workspace action?
# help-with-umbraco
j
Hi, I'm building a workspace action component to add a custom action button on content nodes. My component is extending the
UmbWorkspaceActionBase
class. From the
workspaceContext
I can get the guid of the node using the following code snippet.
Copy code
const workspaceContext = await this.getContext(UMB_DOCUMENT_WORKSPACE_CONTEXT);
const nodeGuid = workspaceContext.getUnique();
But how do I get the culture of the current variant? I can't seem to find that information in the
workspaceContext
? Can I get the info from somewhere else? I can read the culture in from the URL, but it doesn't feel like the right solution. Also in split view both cultures are part of the URL. https://cdn.discordapp.com/attachments/1325473977673580564/1325473978000871486/image.png?ex=677beb56&is=677a99d6&hm=5b786a0c10b4eaee776c71f08cd785c9c9485e6f9a3f1bd5e22b220f9bbc6ea0&
Ohh, I didn't see that the exact same question was asked two days ago by @gregor.tusar but still with no answer: https://discord.com/channels/869656431308189746/1125392773038755890/threads/1324669793818775594
10 Views