[ic] Templates

Zachary Matthews zac@mediapc.com
Tue, 21 Nov 2000 14:33:46 -0800


The files in template/components are snippets of HTML and Interchange 
code that can be included in pages.  For example, look at the following
file in the Construct demo '/catalogs/construct/pages/results.html'

-----------snip from results.html---------------
@_LEFTRIGHT_TOP_@

<!-- BEGIN CONTENT -->
[if scratch did_order]
[include file="templates/components/cart_display"]
[/if]
[set did_order][/set]
-----------------snip---------------

This bit of code shows you how the template/components works.  If the
scratch variable 'did_order' is set (to 1 or any true value), the file
templates/components/cart_display will be inserted right there.  In this
particular case, the cart_display is used to display the contents that a
user has just ordered.  The variable did_order gets set to 1 when you
click the buy button (this occurs in set munge_quantity...which is a
whole other can of worms I'm sure you'll enjoy!!):

[set munge_quantity]
[calc]
 $Scratch->{did_order} = 1;

Hope this helps... good luck!

Zac
----------
>From: Joe Tarnow <joe_punch_clock@yahoo.com>
>To: interchange Mailing list <interchange-users@minivend.com>
>Subject: [ic] Templates
>Date: Tue, Nov 21, 2000, 2:16 PM
>

> Hello users,
>
> I have just installed Interchange and am looking for
> docs on how
> to use the template/components.  I've searched the
> archive and didn't find anything, Could someone tell
> me where to find docs on this.
>
> Thanks
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Shopping - Thousands of Stores. Millions of Products.
> http://shopping.yahoo.com/
>
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@www.minivend.com
> http://www.minivend.com/mailman/listinfo/interchange-users
>