List Info

Thread: using ANY for category with /util/archive_list.mc




using ANY for category with /util/archive_list.mc
user name
2007-12-10 17:39:12
I'm wondering if anyone knows if it's possible to send more
than one  
category to archive_list.mc? Ideally, I'd like to be able to
use  
something like ANY(cat1, cat2). However, using ANY results
in no  
results and no error.

Thoughts?

--
Phillip Smith,
Simplifier of Technology
Community Bandwidth



Re: using ANY for category with /util/archive_list.mc
user name
2007-12-11 04:07:37
On Mon, 10 Dec 2007, Phillip Smith wrote:
> I'm wondering if anyone knows if it's possible to send
more than one category 
> to archive_list.mc? Ideally, I'd like to be able to use
something like 
> ANY(cat1, cat2). However, using ANY results in no
results and no error.
>
> Thoughts?

The template is just a call to Story->list.
You could change $category to category,
and category_uri => ANY(map {"$category%"} category)
.

Re: using ANY for category with /util/archive_list.mc
user name
2007-12-11 10:13:42
On Dec 11, 2007, at 5:07 AM, Scott Lanning wrote:

> On Mon, 10 Dec 2007, Phillip Smith wrote:
>> I'm wondering if anyone knows if it's possible to
send more than  
>> one category to archive_list.mc? Ideally, I'd like
to be able to  
>> use something like ANY(cat1, cat2). However, using
ANY results in  
>> no results and no error.
>>
>> Thoughts?
>
> The template is just a call to Story->list.
> You could change $category to category,
> and category_uri => ANY(map {"$category%"}
category) .

That's hilarious. After talking to David in #bricolage (did
I mention  
that there's a Bricolage IRC channel on irc.perl.org!?  ), and 

demonstrating my ignorance of Postgres, I implemented the
solution  
that you suggest above. Worked like a charm.

Great minds, birds-of-a-feather, or misery loves company? 
;-P

Phillip.

--
Phillip Smith,
Simplifier of Technology
Community Bandwidth



[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )