Skip to content

Instantly share code, notes, and snippets.

@rwatts3
Forked from ronnieduke/mura-node.cfm
Created October 28, 2015 07:34
Show Gist options
  • Save rwatts3/ee829d9f570ec1d2c9de to your computer and use it in GitHub Desktop.
Save rwatts3/ee829d9f570ec1d2c9de to your computer and use it in GitHub Desktop.
Create a new Mura content node
<cfscript>
// Load a new content Bean
bean=$.getBean('content');
//Set the parent node of where you want the new node to live
bean.setParentID('some id');
bean.setTitle('Some Title');
//Should this go live immediately? 0=no 1=yes
bean.setApproved(0);
//Should this be set to display?
bean.setDisplay(1);
//Should it appear in the nav?
bean.setIsNav(0);
// Body & Summary
bean.setSummary('insert summary here');
bean.setBody('insert body here');
// Set whatever other values such as setURLTitle, setKeywords, etc
//Save the bean
bean.save();
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment