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
| <cfset application.serviceFactory.getBean('fileManager').cleanFileCache('[siteid]') /> |
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> | |
| // place this in your Site or Theme eventHandler.cfc, then reload your application! | |
| public any function onApplicationLoad($) { | |
| arguments.$.getBean('contentUtility').findAndReplace( | |
| find='http://olddomain.com' | |
| , replace='http://newdomain.com' | |
| , siteid=arguments.$.event('siteid') | |
| ); | |
| } | |
| </cfscript> |
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> | |
| // simple examples | |
| fileURL = $.getURLForFile('yourFileID'); | |
| imageURL = $.getURLForImage('yourFileID'); | |
| </cfscript> | |
| <!--- File Example ---> | |
| <cfif Len($.getURLForFile($.content('myCustomAttribute')))> | |
| <a href="#$.getURLForFile($.content('myCustomAttribute'))#">Download File</a> | |
| <cfelse> |
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
| component extends='mura.cfobject' { | |
| // drop this in your site or theme eventHandler.cfc | |
| public any function onRenderStart($) { | |
| // allow for a 'View As PDF' link (e.g., <a href="./?viewAsPDF=1">View As PDF</a>) | |
| if ( IsBoolean(arguments.$.event('viewAsPDF')) && arguments.$.event('viewAsPDF') ) { | |
| arguments.$.content('template', 'pdf.cfm'); | |
| } | |
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> | |
| param name='form.csvUrl' default='#getPageContext().getRequest().getScheme()#://#cgi.server_name##getDirectoryFromPath(getPageContext().getRequest().getRequestURI())#users.csv'; | |
| param name='form.group' default='Temp'; | |
| param name='form.isSubmitted' default='false'; | |
| param name='form.isTest' default='true'; | |
| param name='form.siteid' default='default'; | |
| $ = application.serviceFactory.getBean('$').init(form.siteid); | |
| if ( !$.currentUser().isSuperUser() && !$.currentUser().isInGroup('admin') ) { |