Skip to content

Instantly share code, notes, and snippets.

@stevewithington
Last active November 14, 2019 17:36
Show Gist options
  • Save stevewithington/6105242 to your computer and use it in GitHub Desktop.
Save stevewithington/6105242 to your computer and use it in GitHub Desktop.
Mura Scope ($)
<cfscript>
siteid = IsDefined('session') && StructKeyExists(session, 'siteid') ? session.siteid : 'default';
$ = application.serviceFactory.getBean('$').init(siteid);
</cfscript>
@davidpanzarella
Copy link

Thanks for adding this! Been trying to figure out how to get the siteid from session for a component i use. This essentially will attempt to find the current siteid, and if it doesn't find it, will set it to default, correct?

@stevewithington
Copy link
Author

Correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment