Skip to content

Instantly share code, notes, and snippets.

@jsieber
Forked from ronnieduke/mura-bulk-update.cfm
Last active August 29, 2015 14:08
Show Gist options
  • Save jsieber/91ee8683251f9197db52 to your computer and use it in GitHub Desktop.
Save jsieber/91ee8683251f9197db52 to your computer and use it in GitHub Desktop.
<!---
Place this file in your theme remote folder
--->
<cfscript>
// add the content ID of the folder you wish to loop through and turn on
itemID=''
content=$.getBean('content').loadBy(contentID=itemID);
// Only get the feed if it's a valid node
if ( not content.getIsNew()){
// Create a feed
feed=$.getBean('feed');
feed.setContentID(itemID);
feed.setNavOnly(0);
feed.setLiveOnly(0);
//get the iterator
it=feed.getIterator();
}
else{
writeOutput("Invalid Content ID");
abort;
}
</cfscript>
<!--- Loop through each item in the feed and set it's display to 'yes' --->
<cfif it.hasNext()>
<cfloop condition="it.hasNext()">
<cfset item=it.next()>
<cfset item.setDisplay(1)>
<cfset item.setIsNav(1)>
<cfset item.save()>
</cfloop>
</cfif>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment