Yeah, you're right of course. Can'tbelieve I didn't see that when I wrote it out. Anyway, Marc's=A0solution =of two searches is what I'd do too.
p.s so you'resaying that [showif anyvalue] will resolve to true? No comparison needed?= This is the first I'm hearing about this, andI'm a pretty faithful and long-time reader of the list.
On Wed, 5 Aug 2009 10:40:07 -0500
Patrick McCormick <pm@webdna.us> wrote:
> Terry & Ki,
=>
> I don't think that will workbecause [instock] is only
>evaluated within the
[founditems] loop=
>
> You need:
>
>[search stuff...]
>
[founditems]> [hideif [instock]]
&=gt; [item fields]
>[/hideif]
> [/founditems]
> [/search]
>
> BOO=L is a really cool part of WebDNA. Anythinggreater
>than zero is true and anything 0 or less is false. That=
>means that even random strings oftext are, technically
>true. You need to avoid bad code practice=, but there
>are some really clever andgraceful things you can do.
>
> Be aware that something lik=e [showif [instock]=3D1] is
>the same as=20[showif [instock]] as long as [instock] is
>greater than zero when= an item is actually in stock. It
>helps make the code a little bit more readable, too.
>
>
>
>
> On Aug 4,2009, at 1:39 PM, Terry Wilson wrote:
>
>> So you would h=ave two founditems loops within your
>>search:
>>
>> [search stuff...]
>>=
>> [hideif [instock]=3D0]
>>
[founditems]>> ...
>> [/founditems]
>> [/hide=if]
>>
>> [showif[instock]=3D0]
>>
[founditems]>> ...
>> [/fou=nditems]
>>[/showif]
>>
>> [/search]
>>
>> (sort= by sku, not instock)
>>
>>Terry
>>
>> Essentially, we want our product listing pa=ge to do the
>>following:
>>
>>Group all the items that are in stock first, out of
>>stock sec=ond.
>> Within the in stock items, wewant to sort by SKU.
>>
>> Right now, since in stock is= the actual number in stock,
>>it is=20
>> sorting by actual number, not just by what is in stock
&=gt;>and not in
>>stock.
>>
>> -----------
>> Ki Song
>>=;
>> On Tue, Aug 4, 2009 at 2:13 PM,Govinda
>><<mailto:govinda.webdnatalk@gmail.com
>&=gt; >govinda.webdnatalk@gmail.com>wrote:
>>
>> Ki,
>>
>> I don't think =so.
>>
>> But with webdna youdon't need it either. If you are
>>not able to do
>>=; what you want, then post the problem, someonewill
>>surely guide you
>> to the solution.
>&=gt;
>>
>> On Aug 4, 2009, at12:07 PM, Ki Song - Knifecenter.com
>>wrote:
>>
>=;> Is something like this possible in asearch context:
>>
>> &asSKUsort=3D2&deON HANDs=ort=3D1&ON HANDtype=3Dbool
>>
>>Can a data type be type boolean in a search context?
>>
>&=gt; -----------
>> KiSong
>>
>>
>> ------------
>> John Bu=tler (Govinda)
>><mailto:govinda.webdnatalk@gmail.com>govinda.webdnatalk@gmail.com
>>
>>
>>
>>---------------------------------------------------------
>> Thi=s message is sent to you because you aresubscribed
>>to
>> the mailing list
>><&l=t;mailto:talk@webdna.us>talk@webdna.us>.
>>To unsubscribe, E-mail to:
>><<mailto:talk-leave@webdna.u=s>talk-leave@webdna.us
>>>
>> archives:
>><http://mail.webdna.us/list/tal=k@webdna.us>http://mail.webdna.us/list/talk@webdna.us
>>old archives:
>><http://dev.webdna.us/TalkListArchive/>ht=tp://dev.webdna.us/TalkListArchive/
>>
>>
>>--
>> Terry Wilson | terry@terryfic.com | http://terryfic.com
>> http://WhosComing.com - a simplified,affordable online
>>reservation
>> system
>>=; http://TightJacket.com -- stylish protectionfor your
>>laptop
>> ---------------------------------=-----------------------------------------
>>Attitude is the only difference between ordeal and
>>adventure.=
>> ---------------------------------------------------------
>>This message is sent to you because you are subscribed
>>to
=>> the mailing list<talk@webdna.us>.
>> To unsubscribe, E-mail to: <talk-l=eave@webdna.us>
>> archives:http://mail.webdna.us/list/talk@webdna.us
>> old archives: http:=//dev.webdna.us/TalkListArchive/
>
=A0