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
<section> | |
<h2>Mura CMS</h2> | |
<cffeed query="rs" source="http://www.getmura.com/tasks/feed/?feedID=91B4E7A5-37AC-466A-ACDF6ABFD95ACCBD" /> | |
<cfset it = $.getBean('beanIterator').setQuery(rs) /> | |
<ul> | |
<cfif it.hasNext()> | |
<cfloop condition="it.hasNext()"> | |
<cfset item = it.next()> | |
<li> | |
<a href="#item.getValue('rsslink')#"> |
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
<cfscript> | |
// Save this file to a path such as /{SiteID}/includes/remote/ajaxData.cfm | |
// This allows you to pass in the siteid and contentid via URL params | |
param name='url.siteid' default='default'; | |
param name='url.contentid' default='00000000000000000000000000000000001'; | |
// Mura $cope | |
$ = application.serviceFactory.getBean('$').init(url.siteid); | |
// Just in case we need access to the ContentBean | |
cBean = $.getBean('content').loadBy(contentid=url.contentid); | |
$.setContentBean(cBean); |
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
<cfscript> | |
// Drop this in your Site or Theme eventHandler.cfc | |
public any function onBeforeFormSubmitSave($) { | |
// reference to the formBean | |
var formBean = arguments.$.event('formBean'); | |
// example on how to create some errors | |
var error = ''; | |
var errors = {}; |
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
<cfscript> | |
// drop this in your eventHandler.cfc | |
public any function yourMethod() { | |
// you do something here | |
} | |
public any function onApplicationLoad($) { | |
arguments.$.getBean('someBean').injectMethod('someMethod', yourMethod); | |
} |
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
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 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 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> | |
<cfinclude template="inc/html_head.cfm" /> | |
<!--- By getting a feed with a blank value, Mura will return all pages underneith the homepage ---> | |
<cfset feed=$.getBean("content").loadBy(filename='',siteID=$.event("siteid"))> | |
<cfset iterator=feed.getKidsIterator()> | |
<cfif iterator.hasNext()> | |
<body id="home"> | |
<!--- add the "home" page statically ---> | |
<div class="scroll-holder" data-stub="###$.createCSSid($.content('menuTitle'))#-stub" data-image="#$.content().getImageURL('source')#" data-speed="#$.content('pDataSpeed')#"></div> |
OlderNewer