Re: getContentObjects() to filter type with multiple categories

Marco van den Oever <[email protected]>
Newsgroups gmane.comp.cms.farcry.devel
Message-ID <[email protected]>
How does this work when I want to get all dmNews items that have the 
categoryobjectid #i# in catNews, but also when have #i# and another 
categoryobjectid?

<cfset nieuws=application.fapi.getContentObjects(typename="dmNews", 
publishdate_lte=now(), expirydate_gte=now(), catNews_eq="#i#", 
orderby="publishdate DESC",maxRows="7")>

I have some items with multiple catNews values.

Op maandag 22 oktober 2012 11:42:54 UTC+1 schreef Blair McK het volgende:
>
> You can also do catFile_eq to return content with every specified 
> category. :)
>
> Plus, I added support for a all-purpose "categories" property (i.e. 
> categories_in, categories_eq), in case you can't remember what you called 
> the category property.
>
> Blair
>
> On Mon, Oct 22, 2012 at 7:24 PM, Geoff Bowers <[email protected]<javascript:>
> > wrote:
>
>> getcontentobjects() is like magic ;)
>>
>> GB
>>
>>
>> On Monday, 22 October 2012, AJ Mercer wrote:
>>
>>> looks like Farcry is smart enough to work it out
>>>
>>> <cfset qryDocs = application.fapi.getContentObjects(typename="dmFile", 
>>> lProperties="*", catFile_in="#stObj.CATDOCUMENT#,123,456") />
>>>
>>> select *, 'dmFile' as typename 
>>> from dbo.dmFile 
>>> where 1=1 
>>> AND status in ('draft','pending','approved') 
>>> AND 
>>> objectid in ( 
>>> select objectid 
>>> from dbo.refCategories 
>>> where categoryid in ('05867140-1C04-11E2-9C64005056830000','123','456') 
>>> ) 
>>>
>>>
>>> On 22 October 2012 14:37, AJ Mercer <[email protected]> wrote:
>>>
>>>> I would like to know how to use getContentObjects() to filter a given 
>>>> category when the type may have multiple.
>>>>
>>>> Currently, the type (dmFile) is set up like this
>>>> <cfproperty ftSeq="30" ftFieldset="Categorisation" name="catFile" 
>>>> type="string" hint="Flag to make file shared." required="no" 
>>>> ftLabel="Category" ftType="category" ftalias="dmfile" />
>>>>
>>>> I am creating a rule which can select one category (may change 
>>>> to multiple later)
>>>>
>>>> How is getContentObjects() used to do this?
>>>>
>>>>
>>>> -- 
>>>>
>>>> *AJ Mercer*
>>>> <webonix:net strength="Industrial" /> <http://webonix.net> | <webonix:org 
>>>> community="Open" /> <http://webonix.org>
>>>> http://twitter.com/webonix
>>>> Railo Community Manager<http://www.getrailo.org/index.cfm/community/team/>
>>>>
>>>>  
>>>
>>>
>>> -- 
>>>
>>> *AJ Mercer*
>>> <webonix:net strength="Industrial" /> <http://webonix.net> | <webonix:org 
>>> community="Open" /> <http://webonix.org>
>>> http://twitter.com/webonix
>>> Railo Community Manager<http://www.getrailo.org/index.cfm/community/team/>
>>>
>>>  -- 
>>> You received this message cos you are subscribed to "farcry-dev" Google 
>>> group.
>>> To post, email: farcry-dev-/[email protected]
>>> To unsubscribe, email: farcry-dev+unsubscribe-/[email protected]
>>> For more options: http://groups.google.com/group/farcry-dev
>>> --------------------------------
>>> Follow us on Twitter: http://twitter.com/farcry
>>>  
>>>  
>>>
>>  -- 
>> You received this message cos you are subscribed to "farcry-dev" Google 
>> group.
>> To post, email: farcr...-/[email protected] <javascript:>
>> To unsubscribe, email: farcry-dev+...-/[email protected] <javascript:>
>> For more options: http://groups.google.com/group/farcry-dev
>> --------------------------------
>> Follow us on Twitter: http://twitter.com/farcry
>>  
>>  
>>
>
>

-- 
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev-/[email protected]
To unsubscribe, email: farcry-dev+unsubscribe-/[email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
--- 
You received this message because you are subscribed to the Google Groups "farcry-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/groups/opt_out.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.