Last active
November 14, 2019 17:36
-
-
Save stevewithington/6105242 to your computer and use it in GitHub Desktop.
Mura Scope ($)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
siteid = IsDefined('session') && StructKeyExists(session, 'siteid') ? session.siteid : 'default'; | |
$ = application.serviceFactory.getBean('$').init(siteid); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?