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
| <cfcomponent extends="model.util.jsonSerializer" singleton="true"> | |
| <cfproperty name="jsonUTIL" inject="model" /> | |
| <cffunction name="init"> | |
| <!---// let's init Mr. Nadel's serializer---> | |
| <cfset super.init()> | |
| <!--- FOR Reference: PROPERTIES THAT ARE AVAILABLE due to the SUPER.init() call above | |
| // Every key is added to the full key list. |
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
| <cfoutput> | |
| <cfscript> | |
| // Access all of the current content bean's extended attributes | |
| $.content().getExtendedAttributes(); | |
| // Access a specific Extend Set's attributes of the current content bean | |
| $.content().getExtendedAttributes(name='Your Extend Set Name Goes Here'); | |
| // Access a query/recordset of the current content bean's extended attributes | |
| $.content().getExtendedAttributesQuery(); |
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
| <!--- Drop this into your site eventhandler.cfc ---> | |
| <cffunction name="onAfterFormSubmitSave" output="true"> | |
| <cfif $.event('formid') EQ '{ID of the Mura form}'> | |
| <!--- Get the form result ---> | |
| <cfset formBean = $.event().getValue('formresult')> | |
| <!--- Get a new content bean ---> | |
| <cfset cBean = application.contentManager.getBean()> | |
| <!--- Set the new node attributes ---> | |
| <cfset cBean.setSiteID($.event('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> | |
| // Drop this in your Site or Theme eventHandler.cfc | |
| public any function onBeforeContentSave($) { | |
| // reference to the newBean | |
| var newBean = arguments.$.event('newBean'); | |
| // reference to the original contentBean | |
| var oldBean = arguments.$.event('contentBean'); | |
| // example on how to create some errors | |
| var error = ''; |
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
| <!--- Add this to your /config/settings.ini.cfm ---> | |
| maxsourceimagewidth=99999 | |
| <!--- | |
| As long as the source image width is less than the value (in pixels) entered above, | |
| then the source image will NOT be modified at all | |
| ---> | |
| <!--- | |
| Then, you will probably want to copy the '/display_objects/gallery/' directory, |
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
| <cffunction name="onAfterFormSubmitSave"> | |
| <cfargument name="$"> | |
| <cfif $.content('title') eq "{content Title}"> | |
| <!--- Send Sales Leads to SalesForce ---> | |
| <cfhttp method="post" url="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"> | |
| <cfhttpparam type="formfield" name="oid" value="XXXXXXXXXXX"/> | |
| <cfhttpparam type="formfield" name="retURL" value="http://www.domain.com"/> | |
| <!--- | |
| <cfhttpparam type="formfield" name="debug" value="1"/> | |
| <cfhttpparam type="formfield" name="debugEmail" value="[email protected]"/> |
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
| <!--- | |
| Drop this into your config.xml.cfm file, then reload the application | |
| to create a new Folder/Columns content type | |
| ---> | |
| <extension type="Folder" subType="Columns"> | |
| <attributeset name="Column Settings" container="Basic"> | |
| <attribute | |
| name="columnCount" | |
| label="# Columns" | |
| hint="Select the number of columns you wish to split the body area into." |
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> | |
| // Add this to an eventHandler.cfc | |
| public any function onAdminHTMLFootRender($) { | |
| var str = ''; | |
| // this will add a link to the bottom of the 'Modules' button in the back end admin area | |
| savecontent variable='str' { | |
| WriteOutput('<script> | |
| jQuery(document).ready(function($){ | |
| $("##navSecondary").append(''<li><a href="/some-url/"><i class="icon-cog fa-cog"></i> Some URL</a></li>''); | |
| }); |