-
-
Save jsieber/91ee8683251f9197db52 to your computer and use it in GitHub Desktop.
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
<!--- | |
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