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> | |
// This will delete all items that have a type of link under the same parent at this page. Include this to a page in the same parent with the Mura tag. | |
// writeDump(var=$.content('type'), abort=true); | |
queryService=new Query(); | |
queryService.setSQL( | |
'SELECT contentID, siteid | |
FROM tcontent | |
WHERE parentID = :parentID | |
AND siteID = :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
ucase(Concat(left(uuid(), 23), right(uuid(),12))) |
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
<!--- Place alert about category display if showing blog category results. This is added into a custom version of dsp_Folder.cfm ---> | |
<cfset categoryBean = variables.$.getBean('category').loadBy(categoryID='#variables.$.event('categoryID')#', siteid=variables.$.event('siteid'))> | |
<cfif len(categoryBean.getName()) and variables.$.content('contentId') eq "2A66AE85-77CB-407F-B3FCD352EC6F64B8"> | |
<div class="alert alert-success">Blog posts in the "#categoryBean.getName()#" category. <a href="/resources/blog">Return</a> to the full blog.</div> | |
</cfif> |
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
<cfif variables.$.event('expired') eq true> | |
<div class="alert alert-error">#variables.$.rbKey('user.forgotexpired')#</div> | |
</cfif> |
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> | |
<!--- Read out an existing node from the default site.---> | |
<cfset contentBean=application.contentManager.getActiveContent('59280367-A98E-4F7D-B4463B3E405054FD','default')> | |
<!--- Pull out a content iterator of the nodes child content (all underlying pages within a given node).---> | |
<cfset it=contentBean.getKidsIterator(liveOnly='false') /> | |
<!--- The number of Items to be listed is determined by the content.getNextN() value. Its default is 10. ---> | |
<cfset it.setPage(1)> | |
<!--- You can also set the start row instead of setting a page number. ---> | |
<cfset it.setStartRow(1)> |
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
<!--- Stick this in to your theme/remote/rebuild.cfm ---> | |
<cfset application.serviceFactory.getBean('fileManager').rebuildImageCache(siteid='YOURSITEID')> |
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
<!--- | |
Place this file in your theme remote folder | |
---> | |
<cfscript> | |
// add the content ID of the folder you wish to loop through and turn on | |
itemID='' | |
content=$.getBean('content').loadBy(contentID=itemID); | |
// Only get the feed if it's a valid node |
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> | |
// This will NOT work unless you have 'allowlocalfiles=true' in /config/settings.ini.cfm | |
// read image info on local file for default value | |
try { | |
ir = ImageRead('steve-withington.jpg'); | |
img = ir.source; | |
} catch(any e) { | |
img = ''; | |
} |
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 eventHandler.cfc | |
public void function onSiteCKFinderConfig($) { | |
var config = arguments.$.event('config'); | |
// Override CKFinder's default image compression settings to allow for hi-res images | |
config.images.maxWidth = 0; | |
config.images.maxHeight = 0; | |
config.images.quality = 100; |
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
function onPageBodyRender($) { | |
// add release date to top of blog posts. Include contentID of parent in if statement. | |
if ($.content('parentID') eq '57B92471-11BA-4759-937182D9ADED7226') { | |
return "<p id='releaseDate'><i class='ion-calendar'></i> #dateformat($.content('releaseDate'), 'medium')# #timeFormat($.content('releaseDate'), 'medium')#</p>" & $.setDynamicContent($.content('body')); | |
} | |
} |