Re: Creating comums

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17952
interpreted = N
texte = Here is the code from one of my own search results.  It's the same as Ken's but perhaps having a second example will help.  Best of luck!

Kimberly Wyrick


<table width="100%" border="0" cellspacing="0" cellpadding="1" align="Center">
<font face="Arial, Helvetica, sans-serif" size="2">
<tr>
[foundItems]
<td align="left" width="250"><a href="types.tpl?command=search&db=store.txt&eqLocationdatarq=[url][Location][/url]&searchTitle=[url][searchTitle][/url]&eqCategorydatarq=[url][Category][/url]&Typesumm=t&Typesort=1&Typesdir=as&max=50">
<img src="images/[lookup db=catphoto.txt&value=[url][Category][/url]&lookinfield=Category&returnfield=Photo&notfound=black.gif]" border="0">
</a>
</td>
[showif [index]\2]</tr><tr>[/showif]
[/foundItems]
</tr>             
</font>
</table>


At 08:16 AM 5/29/98, greg wrote:
>I'll try this again. This time without styles.
>
>Thank you for responding. I wasn't sure if my email made it to the list.
>I fooled around with your solution and couldn't seem to make it work with
>my template. Any further help would be appreciated.
>Here is the code I am trying to apply it to.
>
>[showif [searchTitle]=All]
><H3>All Items in the Catalog</H3>
>[/showif]
>
>[hideif [searchTitle]=All]
><H3>Your search for '[searchTitle]' found [numFound] items</H3>
>[/hideif]<P>
>
>[foundItems]
><P ALIGN="CENTER"><CENTER><TABLE BORDER CELLSPACING=1 CELLPADDING=0 WIDTH=60%>
>
><TR><TD VALIGN="CENTER" ALIGN="CCENTER" WIDTH="60%" ROWSPAN=5 HEIGHT=300>
><P>[showif [hasPhoto]=T]<img align=left
>src="/catalogimages/[PhotoName]"[/showif]</td>
>
><TD WIDTH="40%" VALIGN="TOP" HEIGHT=260>
><P>[description]</TD>
></TR>
>
><TR><TD WIDTH="40%" VALIGN="TOP" HEIGHT=10>
><P>[title]</TD>
></TR>
>
><TR><TD WIDTH="40%" VALIGN="TOP" HEIGHT=10>
><P>$[format .2f][price][/format]</TD>
></TR>
>
><TR><TD WIDTH="40%" VALIGN="TOP" HEIGHT=10>
><P><a
>href="ShoppingCart.tpl?username=[username]&password=[password]&command=add&d
>b=catalog.txt&sku=[url][sku][/url]&cart=[cart]">Add to Cart</a></TD>
></TR>
>
><TR><TD WIDTH="40%" VALIGN="TOP" HEIGHT=10>
><P><a
>href="Detail.tpl?username=[username]&password=[password]&command=search&db=c
>atalog.txt&eqskudata=[url][sku][/url]&cart=[cart]">Detail</a></TD>
></TR>
></TABLE>
>[/foundItems]
></CENTER>
>[shownext]<a
>href="EntryResults.tpl?username=[username]&password=[password]&command=searc
>h&[searchstring]">Show Items [start]-[end]<br>[/shownext]
><a
>href="ShoppingCart.tpl?username=[username]&password=[password]&command=showc
>art&db=catalog.txt&cart=[cart]">Show Shopping Cart</a><br>
><a
>href="Search.tpl?username=[username]&password=[password]&command=search&db=c
>atalog.txt&geSKUdata=0&cart=[cart]&categorysumm=t&categorysort=1">Back To
>Search</a>
>
>At 11:45 AM 5/27/98 -1000, you wrote:
>>>Is there a way to create search results to be displayed in 2 columns? For
>>>Example, if the results return 10 items I would like 2 columns of 5.
>>
>>
>>This syntax does it:
>>
>><table>
>>[search]
>><tr>
>>[founditems]
>><td>[fieldName]</td> [showif [index]\2]</tr><tr>[/showif]
>>[/founditems]
>></tr>
>>[/search]
>>
>>
>>
>>Sincerely,
>>Ken Grome
>>808-737-6499
>>WebDNA Solutions
>>mailto:ken@webdna.net
>>> >/ eudora=autourl>http://www.webdna.net
>>
>

Web Services Specialist
CNETech Net
www.cnetech.com

Associated Messages, from the most recent to the oldest:

    
  1. Re: Creating comums (Kimberly Wyrick 1998)
  2. Re: Creating comums (greg 1998)
  3. Re: Creating comums (Kenneth Grome 1998)
  4. Creating comums (greg 1998)
Here is the code from one of my own search results.  It's the same as Ken's but perhaps having a second example will help.  Best of luck!

Kimberly Wyrick


<table width="100%" border="0" cellspacing="0" cellpadding="1" align="Center">
<font face="Arial, Helvetica, sans-serif" size="2">
<tr>
[founditems]
<td align="left" width="250"><a href="types.tpl?command=search&db=store.txt&eqLocationdatarq=[url][Location][/url]&searchTitle=[url][searchTitle][/url]&eqCategorydatarq=[url][Category][/url]&Typesumm=t&Typesort=1&Typesdir=as&max=50">
<img src="images/[lookup db=catphoto.txt&value=[url][Category][/url]&lookinfield=Category&returnfield=Photo&notfound=black.gif]" border="0">
</a>
</td>
[showif [index]\2]</tr><tr>[/showif]
[/foundItems]
</tr>             
</font>
</table>


At 08:16 AM 5/29/98, greg wrote:
>I'll try this again. This time without styles.
>
>Thank you for responding. I wasn't sure if my email made it to the list.
>I fooled around with your solution and couldn't seem to make it work with
>my template. Any further help would be appreciated.
>Here is the code I am trying to apply it to.
>
>[showif [searchTitle]=All]
><H3>All Items in the Catalog</H3>
>[/showif]
>
>[hideif [searchTitle]=All]
><H3>Your search for '[searchTitle]' found [numFound] items</H3>
>[/hideif]<P>
>
>[founditems]
><P ALIGN="CENTER"><CENTER><TABLE BORDER CELLSPACING=1 CELLPADDING=0 WIDTH=60%>
>
><TR><TD VALIGN="CENTER" ALIGN="CCENTER" WIDTH="60%" ROWSPAN=5 HEIGHT=300>
><P>[showif [hasPhoto]=T]<img align=left
>src="/catalogimages/[PhotoName]"[/showif]</td>
>
><TD WIDTH="40%" VALIGN="TOP" HEIGHT=260>
><P>[description]</TD>
></TR>
>
><TR><TD WIDTH="40%" VALIGN="TOP" HEIGHT=10>
><P>[title]</TD>
></TR>
>
><TR><TD WIDTH="40%" VALIGN="TOP" HEIGHT=10>
><P>$[format .2f][price][/format]</TD>
></TR>
>
><TR><TD WIDTH="40%" VALIGN="TOP" HEIGHT=10>
><P><a
>href="ShoppingCart.tpl?username=[username]&password=[password]&command=add&d
>b=catalog.txt&sku=[url][sku][/url]&cart=[cart]">Add to Cart</a></TD>
></TR>
>
><TR><TD WIDTH="40%" VALIGN="TOP" HEIGHT=10>
><P><a
>href="Detail.tpl?username=[username]&password=[password]&command=search&db=c
>atalog.txt&eqskudata=[url][sku][/url]&cart=[cart]">Detail</a></TD>
></TR>
></TABLE>
>[/foundItems]
></CENTER>
>[shownext]<a
>href="EntryResults.tpl?username=[username]&password=[password]&command=searc
>h&[searchstring]">Show Items [start]-[end]<br>[/shownext]
><a
>href="ShoppingCart.tpl?username=[username]&password=[password]&command=showc
>art&db=catalog.txt&cart=[cart]">Show Shopping Cart</a><br>
><a
>href="Search.tpl?username=[username]&password=[password]&command=search&db=c
>atalog.txt&geSKUdata=0&cart=[cart]&categorysumm=t&categorysort=1">Back To
>Search</a>
>
>At 11:45 AM 5/27/98 -1000, you wrote:
>>>Is there a way to create search results to be displayed in 2 columns? For
>>>Example, if the results return 10 items I would like 2 columns of 5.
>>
>>
>>This syntax does it:
>>
>><table>
>>[search]
>><tr>
>>[founditems]
>><td>[fieldName]</td> [showif [index]\2]</tr><tr>[/showif]
>>[/founditems]
>></tr>
>>[/search]
>>
>>
>>
>>Sincerely,
>>Ken Grome
>>808-737-6499
>>WebDNA Solutions
>>mailto:ken@webdna.net
>>> >/ eudora=autourl>http://www.webdna.net
>>
>

Web Services Specialist
CNETech Net
www.cnetech.com

Kimberly Wyrick

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

SAVECART (1997) HideIf ip= OR ip (1998) show all problem (1997) Bug Report, maybe (1997) Running WebCat from a CD-ROM (1997) Using Plug-In while running 1.6.1 (1997) writing cart to db (1998) Lookup question (2001) WebCat2b12 Mac.acgi--[searchstring] bug (1997) Bug Report, maybe (1997) [OT] Bandwidth Choking (2005) Explorer oddities (1997) Upload Maximum (2003) WebCatalog Mac 2.1b3 (1997) WebDNA & Suse Linux (2004) search form problem.. (1997) Frames and WebCat (1997) embedded showif statements (2000) WebDNA on Redhat (2008) Re:Searching for ALL / empty form field (1997)