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
<!--- | |
This is an uber simple method to output children, grandchildren, etc. based on the parent's contentid | |
If you're looking for an easy way to output a child nav, you could also just use Mura's baked-in $.dspNestedNav(contentid) method. | |
See the file located under /requirements/mura/content/contentRenderer.cfc for details. | |
---> | |
<cffunction name="dspDecendants"> | |
<cfargument name="contentid" required="true" /> | |
<cfset var local = {} /> | |
<cfset local.str = '' /> | |
<cfset local.cBean = $.getBean('content').loadBy(contentid=arguments.contentid) /> |
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
<!--- | |
1. Create a "Class Extension" for Link / Video | |
2. Replace the existing dspCarouselByFeedName() method in the theme's contentRenderer.cfc with the one below | |
3. Go add some Link/Video content types to your content collection. | |
For example, copy the YouTube "embed" video src link (Share > Embed) [e.g., https://www.youtube.com/embed/_l09H-3zzgA] | |
and paste that into the "URL" field when creating a content item. | |
---> | |
<cffunction name="dspCarouselByFeedName" output="false"> | |
<cfargument name="feedName" type="string" default="Slideshow" /> |
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> | |
// Mura CMS example of how to send notifications to users after they've been activated | |
public any function onAfterUserCreate($) { | |
user = arguments.$.event('userBean'); | |
// By default, we're going to set all newly created users to 'inactive' ... | |
// you could also add the user to a group, etc. here if you wanted to as well | |
user.set('inActive', 1).save(); | |
} |
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
<!--- | |
I recommend using Google Analytics or some other service to track and obtain page view data. | |
This is due to the fact that tracking session data can be expensive as far as database resources, and bandwidth ... | |
and the higher the number of days you track, the greater potential for running into performance issues. | |
Because of this, I usually recommend that clients set this to zero (0) and use an alternate way to obtain this data. | |
However, if you insist, follow the instructions below ... | |
---> | |
<!--- in your /config/settings.ini.cfm file, look for the following ---> | |
sessionhistory=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
<!--- | |
These examples show how to consume and output a RSS feed using CFML's <cffeed> tag | |
More info: | |
* http://docs.lucee.org/reference/tags/feed.html | |
* https://wikidocs.adobe.com/wiki/display/coldfusionen/cffeed | |
---> | |
<cfoutput> | |
<!DOCTYPE html> | |
<html> | |
<head> |
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
<!--- | |
Author: Stephen J. Withington, Jr. | |
Notes: Place this under a temp directory within your Mura CMS root to test. | |
For example: http://yourdomain.com/temp/json-test.cfm | |
---> | |
<cfscript> | |
param name="form.endpoint" default="content/new"; | |
param name="form.method" default="GET"; | |
param name="form.context" default=""; | |
param name='session.siteid' default='default'; |
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> | |
// Example of how to get a CSV report of all content items | |
// Drop this under a temp directory under the Mura webroot | |
// You could explicitly set this to any siteid you want, if desired | |
if ( !IsDefined('$') ) { | |
siteid = StructKeyExists(session, 'siteid') ? session.siteid : 'default'; | |
$ = application.serviceFactory.getBean('$').init(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> | |
// Related to a thread on the Mura CMS Developers Google Group: https://groups.google.com/forum/#!topic/mura-cms-developers/AHp9aUCsU5g | |
// Please review my response there before using this method! Most importantly, this does not check permissions to view the other content | |
// and other such things as the normal $.dspBody() does. YOU HAVE BEEN WARNED! | |
// Drop this in your Site or Theme contentRenderer.cfc | |
// Display the body of another page | |
public any function dspBodyByPageTitle(required string pageTitle, string siteid=$.event('siteid')) { | |
var contentBody = ''; | |
var contentBean = $.getBean('content').loadBy(title=arguments.pageTitle, siteid=arguments.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
<!-- | |
Enable CORS on Tomcat : Place under libexec/conf/web.xml or WEB-INF/web.xml | |
See http://enable-cors.org/server_tomcat.html and http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#CORS_Filter | |
--> | |
<!-- ================== CUSTOM Filter Definitions ===================== --> | |
<filter> | |
<filter-name>CorsFilter</filter-name> | |
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class> | |
<init-param> | |
<param-name>cors.allowed.origins</param-name> |
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
#!/usr/bin/env ruby | |
# Aside from removing Ruby on Rails specific code this is taken verbatim from | |
# mislav's git-deploy (http://github.com/mislav/git-deploy) and it's awesome | |
# - Ryan Florence (http://ryanflorence.com) | |
# | |
# Install this hook to a remote repository with a working tree, when you push | |
# to it, this hook will reset the head so the files are updated | |
if ENV['GIT_DIR'] == '.' |