Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleFor example, within an extended ./myproject/packages/types/dmNews.cfc
<cffunction name="contentToIndex" returntype="query" description="Gets news content to index">
	
  <cfset qContentToIndex = application.fapi.getContentObjects(typename="dmNews",lProperties="objectid",publishDate_lte=now(),expiryDate_gt=now()) /> 

  <!--- 
  Get CONTENT ---> in earlier versions of FarCry without the wonderful getContentObjects() 
  
  <cfquery name="qContentToIndex" datasource="#application.dsn#">
  select objectid 
  from dmNews
  where status = 'approved' and publishdate <= getdate()
  </cfquery>
  --->

  <cfreturn qContentToIndex>

</cffunction>

...