[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bricolage-general
Subject:    two uri criteria for Story->list
From:       "Jerome Woody" <jwoody () grist ! org>
Date:       2007-08-14 23:56:30
Message-ID: 3B7613DB9004774C9DBEC765D171FB969FB46E () notion ! grist ! local
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello all:

 

I have a question regarding Bric::Biz::Asset::Business::Story->list : 

 

I'm attempting to retrieve stories from two difference categories and
store them in the same array:

 

I can do this by having two separate arrays using story->list, each
list() having two difference primary_uri or category_uri parameters. But
what I would love to do is the something akin to this:

 

 

my @all_stories = Bric::Biz::Asset::Business::Story->list({

            'Order' => 'cover_date',

            'OrderDirection' => 'DESC',

            'publish_status' => '1',

            'output_channel_id' => '1',

            'element_id' => '1', # Story

            'primary_uri' => '/path/to/uri1%',

            'primary_uri' => '/path/to/uri2%'

            'Limit' => 30});

 

I would appreciate any advice on this. Thanks so much

 

<http://www.grist.org> <http://www.grist.org/>   <http://www.grist.org/>
 <http://www.grist.org/>  <http://www.grist.org/>  
<http://www.grist.org> Jerome Woody | Web Developer
206.876.2020 ext. 231 | www.grist.org
Sign up <http://www.grist.org/signup/>  to receive free environmental
news and commentary by email 

Please note our new address: 710 Second Ave. Suite 860 | Seattle, WA
98104 

 

 

 


[Attachment #5 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:st1="urn:schemas-microsoft-com:office:smarttags" \
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PostalCode"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="State"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="Street"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="address"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"Trebuchet MS";
	panose-1:2 11 6 3 2 2 2 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1027" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hello all:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I have a question regarding
Bric::Biz::Asset::Business::Story-&gt;list : <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I&#8217;m attempting to retrieve stories from two difference
categories and store them in the same array:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I can do this by having two separate arrays using
story-&gt;list, each list() having two difference primary_uri or category_uri
parameters. But what I would love to do is the something akin to \
this:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>my @all_stories =
Bric::Biz::Asset::Business::Story-&gt;list({<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
'Order' =&gt; 'cover_date',<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
'OrderDirection' =&gt; 'DESC',<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
'publish_status' =&gt; '1',<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
'output_channel_id' =&gt; '1',<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
'element_id' =&gt; '1', # Story<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
'primary_uri' =&gt; '/path/to/uri1%',<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&#8216;primary_uri&#8217; =&gt; \
&#8216;/path/to/uri2%&#8217;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
'Limit' =&gt; 30});<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I would appreciate any advice on this. Thanks so \
much</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><a
href="http://www.grist.org" title="http://www.grist.org/"></a><a
href="http://www.grist.org/" title="http://www.grist.org/"></a></span></font><!--[if \
gte vml 1]><v:shapetype   id="_x0000_t75" coordsize="21600,21600" o:spt="75" \
o:preferrelative="t"   path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
 <v:stroke joinstyle="miter" />
 <v:formulas>
  <v:f eqn="if lineDrawn pixelLineWidth 0" />
  <v:f eqn="sum @0 1 0" />
  <v:f eqn="sum 0 0 @1" />
  <v:f eqn="prod @2 1 2" />
  <v:f eqn="prod @3 21600 pixelWidth" />
  <v:f eqn="prod @3 21600 pixelHeight" />
  <v:f eqn="sum @0 0 1" />
  <v:f eqn="prod @6 1 2" />
  <v:f eqn="prod @7 21600 pixelWidth" />
  <v:f eqn="sum @8 21600 0" />
  <v:f eqn="prod @7 21600 pixelHeight" />
  <v:f eqn="sum @10 21600 0" />
 </v:formulas>
 <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" />
 <o:lock v:ext="edit" aspectratio="t" />
</v:shapetype><v:shape id="_x0000_s1026" type="#_x0000_t75" alt="" 
 href="http://www.grist.org/" title="http://www.grist.org/" style='position:absolute;
 margin-left:-12.75pt;margin-top:-11.25pt;width:52.5pt;height:48pt;z-index:1;
 mso-wrap-distance-left:5.25pt;mso-wrap-distance-right:5.25pt;
 mso-position-horizontal-relative:text;mso-position-vertical-relative:line' 
 o:allowoverlap="f" o:button="t">
 <v:imagedata src="cid:image001.gif@01C7DE94.10041EA0" o:title="image001" />
 <w:wrap type="square"/>
</v:shape><![endif]--><![if !vml]><a href="http://www.grist.org/"><img
border=0 width=70 height=64 src="cid:image001.gif@01C7DE94.10041EA0"
align=left hspace=7 title="http://www.grist.org/" \
v:shapes="_x0000_s1026"></a><![endif]><a href="http://www.grist.org/"></a><a \
href="http://www.grist.org/" title="http://www.grist.org/"></a><a \
href="http://www.grist.org" title="http://www.grist.org/"></a><st1:PersonName \
w:st="on"><font size=2  face="Trebuchet MS"><span \
style='font-size:10.0pt;font-family:"Trebuchet MS"'>Jerome  \
Woody</span></font></st1:PersonName><font size=2 face="Trebuchet MS"><span \
style='font-size:10.0pt;font-family:"Trebuchet MS"'> | Web Developer<br> 206.876.2020 \
ext. 231 | <a href="http://www.grist.org" \
title="http://www.grist.org/">www.grist.org</a><br> <a \
href="http://www.grist.org/signup/" title="http://www.grist.org/signup/">Sign up</a> \
to receive free environmental news and commentary by email <br clear=all>
<br clear=all>
Please note our new address: <st1:Street w:st="on"><st1:address w:st="on">710
  Second Ave.</st1:address></st1:Street> <st1:address w:st="on"><st1:Street
 w:st="on">Suite</st1:Street> 860</st1:address> | <st1:place w:st="on"><st1:City
 w:st="on">Seattle</st1:City>, <st1:State w:st="on">WA</st1:State> <st1:PostalCode
 w:st="on">98104</st1:PostalCode></st1:place> <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;</span><o:p></o:p></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic