Skip to content

Instantly share code, notes, and snippets.

@ronnieduke
Created January 19, 2015 23:43
Show Gist options
  • Save ronnieduke/da149dc3e98568db9a24 to your computer and use it in GitHub Desktop.
Save ronnieduke/da149dc3e98568db9a24 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