Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Mura method for getting a feed based on restrict groups
<cffunction name="getFeedByRestrictGroups" output="false">
<cfargument name="restrictGroups" required="true">
<cfargument name="maxItems" default="20">
<!--- Get the feed object by name --->
<cfset var feed = $.getBean("feed")>
<cfset var item = "">
<cfset feed
<cfset feed.addParam(relationship='andOpenGrouping')>
<cfloop list="#arguments.restrictGroups#" index="item">
<cfset feed.addParam(
, relationship='OR'
, condition='CONTAINS'
, criteria=item
, dataType='VARCHAR'
<cfset feed.addParam(relationship='closeGrouping')>
<cfreturn feed>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment