Last active
December 21, 2015 11:39
-
-
Save sjungling/6300801 to your computer and use it in GitHub Desktop.
This file contains 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
<!--- | |
Queues up specific packages that may not follow defined paths of themes/module/page | |
Example Usage: <cfset application.themeService.loadModule("build.modules.404") /> | |
---> | |
<cffunction name="loadModule" returntype="void" access="public" output="true"> | |
<cfargument name="module" type="string" /> | |
<cflog text="loadModule called for #module#" /> | |
<cfset var results = StructGet("application.assetMap.#module#") /> | |
<cfif NOT structIsEmpty(results)> | |
<cfif StructKeyExists(results, "css")> | |
<cfset request.util.includeMultiple(includeList=ArrayToList(StructFind(results,"css"))) /> | |
</cfif> | |
<cfif StructKeyExists(results, "js")> | |
<cfset request.util.includeMultiple(includeList=ArrayToList(StructFind(results,"js")), footer=true) /> | |
</cfif> | |
</cfif> | |
</cffunction> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment