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
<!--- | |
Ex: <cfoutput>#listDirectChildren( 'My Title')#</cfoutput> | |
NOTE: Mura refers to children as "kids" in its internal methods and functions. | |
---> | |
<cffunction name="listDirectChildren"> | |
<cfargument name="parentname" required="true" /> | |
<!--- Local variable for use inside this function. ---> | |
<cfset var local = {} /> | |
<cfset local.str = '' /> | |
<cfset local.cBean = $.getBean('content').loadBy(title=arguments.parentname) /> |
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
<cfset directChildren = $.content().getKidsQuery()> | |
<cfquery name="specificChild" dbtype="query"> | |
SELECT * FROM directChildren WHERE title = 'My Specific Title'; | |
</cfquery> | |
<cfif specificChild.recordCount neq 0> | |
<!--- The named child is present, so we'll do some stuff. ---> | |
<cfelse> | |
<!--- Do nothing. ---> | |
</cfif> |
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
var myObject = { | |
one: { | |
two: { | |
three: 'This is the string you want to see' | |
} | |
} | |
} | |
function getObjectProps(objTarget, strProp) { |
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
function getData() { | |
// Fiddle example here: https://jsfiddle.net/briancribb/1j9kdy2q/ | |
// Using an array of data sources, so we can add or subtract them later if we want to. | |
var that = this, | |
dfd_array = [], | |
dfd_sources = { | |
FIRST : { path:'path/to/data/stuff.json'}, | |
SECOND : { path:'path/to/data/stuff.json'} |