I am running a snippet from a group of global actions. To dynamically change content, I need to know which one was clicked. I tried I few things unsuccessfully and therefore need the help of the community. Thanks.
Page 1 / 1
Hmmmm … not sure about knowing which was clicked.
I do know that you can set it up such each Global Action runs a snippet specific to it which then runs the snippet you created. In doing so, each of these snippets can pass in a parameter in order to be able know which Global Action was clicked.
See this post by Moshe.
Create a snippet like this to make this work.
var params = argumentst0],<br />$ = skuid.$,<br />snip = skuid.snippet.getSnippet('your_snippet');<br /> snip(argumentst0], "GlobalAction1");
Then in your existing snippet you would take this second parameter, which from the above example would be “GlobalAction1” and use it in your snippet.
As an example.
var params = argumentsu0], <br />$ = skuid.$,<br />globalAction = argumentsu1]; <br />if (globalAction == "GlobalAction1"){ //Codehere }
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.