-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathicfoundation.sdf
4236 lines (3160 loc) · 115 KB
/
icfoundation.sdf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
!init OPT_LOOK="icdevgroup"; OPT_STYLE="manual"
# $Id: icfoundation.sdf,v 1.29 2004-05-05 15:22:30 jon Exp $
!define DOC_NAME "Foundation Store"
!define DOC_TYPE ""
!define DOC_CODE "icfoundation"
!define DOC_VERSION substr('$Revision: 1.29 $', 11, -2)
!define DOC_STATUS "Draft"
!define DOC_PROJECT "Interchange"
!define DOC_URL "http://www.icdevgroup.org/doc/icfoundation.html"
!build_title
H1: The Foundation Store
The Foundation store is distributed with Interchange to give you a
starting point with which to build your e-business. While the Foundation
store is designed to be relatively easy to start with, it is still a
full-featured demonstration of a number of Interchange capabilities.
Once you understand the Foundation store and how it works you are well
on your way to understanding the Interchange software.
The following is a list of some popular features:
LI1: Category Searches
.Regardless of the number of products in a catalog, categorizing them makes them easier to find. Pick a field in the database, typically named C<category>, and classify the products for search using Interchange.
LI1: Images
.You can display a thumbnail image for the items that have images. To do this, add an image field in the database. (See the 'image' field of the products database.)
LI1: Related Items
.You can embed searches of similar products on an individual product display page with the C<[query ...]> or C<[loop ...]> tags. Or, if customer data is developed, search a past order database and display products that would be of interest to that customer.
LI1: Reviews/Testimonials
.You can key the placement of a review or testimonial on the existence of a file being in a certain directory. This is reasonable to do when a user is viewing a single product.
H2: Customizing Foundation
The foundation store has been customized to add just about every ecommerce
and content management feature under the sun. If you are asking the question
"can I do ...." the answer is almost assuredly "Yes".
Note that customizing the foundation store will take some experience
in web design and database operations. Perl experience is also helpful.
Most of all it will take persistence and empowering yourself to make
changes and watch what happens.
It is usually helpful to make a test store, perhaps just an unmodified
copy of foundation, to test out your additions before you make them on
your own store. That way you can try anything you want without the chance
of causing problems on your own store.
H1: Tree design
By determining how users will enter and exit the catalog, complex and intelligent conditional schemes are possible, especially if the Cookies capability is exercised. However, it is recommended that simplicity be used. Consumers will not make purchases if they can't navigate their way around the catalog.
It is important to remember that users will lose their session (and items in their shopping cart) if their browser does not accept cookies and they leave the site. Interchange addresses this problem by using the C<area> and C<page> tags. If you are using frames, source all frame panes containing Interchange links from an initial page served by Interchange. If you don't do this, the user may have multiple session IDs depending on which frame generated the link.
Note that Interchange can work properly even if the browser doesn't store cookies. In this situation Interchange inserts a session ID into each URL; if the ID is preserved as the user navigates from page to page the session will remain intact.
H1: The Catalog Directory
Interchange pages are contained in the catalog directory. Each individual catalog has its own base directory. The catalog directory has the following structure by default:
LI1: catalog.cfg
.File containing configuration directives for a particular catalog. Configuration settings established in the catalog.cfg directory will not effect any other catalogs running under the version of Interchange you are using. Subcatalogs can have differing information in a file named for that subcatalog.
LI1: config
.Directory that will be read when directives are set with the C<filename> notation. For example, the file C<config/static.pages> will be read when the following directive is encountered in the C<catalog.cfg> file.
!block example; listitem=2
StaticPage <static.pages
!endblock
.This directory also contains template information used with the C<makecat> program.
LI1: error.log
.File which contains catalog-specific errors. It is also where any syntax errors in embedded Perl code are shown.
LI1: etc
.Directory normally used for tracking files, order profiles, and other configuration and log information.
LI1: pages
.Directory that contains the pages of the catalog. This can be considered to be the "document root" of the catalog. Pages contained therein are called with the path information after the script name. For example:
!block example; listitem=2
C</cgi-bin/simple/products/gold> will call the page in the file
C<pages/products/gold.html>.
!endblock
LI1: products
.Directory that contains database source files, including the special Interchange databases shipping.asc, pricing.asc (and other shipping database files).
LI1: session
.Directory that contains session files.
LI1: tmp
.The temporary or scratch directory used for various storage reasons, like retired ID numbers, search paging files, sort tests, import temporary files, etc. This is the default set by ScratchDir. It can be redefined to be located on another partition.
H1: Page Templates
This section describes the files located in the Foundation demo.
H2: Template File Locations
This diagram shows the directory and file structure used for the
default Foundation 'templates' directory. The base will be a directory
with the name of your catalog, here called CATROOT.
!block example
CATROOT/
|
|----templates/
|----cart
|----components/
|----affiliate_receptor
|----best_horizontal
|----best_vertical
|----cart
|----cart_display
|----cart_tiny
|----category_vertical
|----cross_horizontal
|----cross_vertical
|----modular_buy
|----modular_update
|----none
|----promo
|----promo_horizontal
|----promo_vertical
|----random
|----random_horizontal
|----random_vertical
|----saved_carts_list_small
|----search_box_small
|----upsell
|----upsell_horizontal
|----upsell_vertical
|----default --> foundation
|----foundation/
|----cart
|----fullwidth
|----leftonly
|----leftright
|----regions/
|----LEFTONLY_BOTTOM
|----LEFTONLY_TOP
|----LEFTRIGHT_BOTTOM
|----LEFTRIGHT_TOP
|----NOLEFT_BOTTOM
|----NOLEFT_TOP
|----simple
|----theme.cfg
|----fullwidth
|----leftonly
|----leftright
|----regions/
|----LEFTONLY_BOTTOM
|----LEFTONLY_TOP
|----LEFTRIGHT_BOTTOM
|----LEFTRIGHT_TOP
|----NOLEFT_BOTTOM
|----NOLEFT_TOP
|----sampledata/
|----computers/
|----images/
|----items/
|----generic.gif
|----gift_certificate_large.gif
|----yourimage.gif
|----thumb/
|----generic_thumb.gif
|----gift_certificate.gif
|----thumb.gif
|----products/
|----inventory.txt
|----merchandising.txt
|----mv_metadata.asc
|----options.txt
|----pricing.txt
|----products.txt
|----userdb.txt
|----reports/
|----download/
|----00352as.pdf
|----11993ab.pdf
|----22083da.pdf
|----49503cg.pdf
|----59330rt.pdf
|----59402fw.pdf
|----66548ch.pdf
|----73358ee.pdf
|----83491vp.pdf
|----90773sh.pdf
|----products/
|----mv_metadata.asc
|----products.txt
|----userdb.txt
|----tools/
|----etc/
|----after.cfg
|----before.cfg
|----images/
|----items/
|----os28004.gif
|----os28005.gif
|----os28006.gif
|----os28007.gif
|----os28008.gif
|----os28009.gif
|----os28011.gif
|----os28044.gif
|----os28057a.gif
|----os28057b.gif
|----os28057c.gif
|----os28062.gif
|----os28064.gif
|----os28065.gif
|----os28066.gif
|----os28068.gif
|----os28068a.gif
|----os28068b.gif
|----os28069.gif
|----os28070.gif
|----os28072.gif
|----os28073.gif
|----os28074.gif
|----os28075.gif
|----os28076.gif
|----os28077.gif
|----os28080.gif
|----os28081.gif
|----os28082.gif
|----os28084.gif
|----os28085.gif
|----os28086.gif
|----os28087.gif
|----os28108.gif
|----os28109.gif
|----os28110.gif
|----os28111.gif
|----os28112.gif
|----os28113.gif
|----os29000.gif
|----thumb/
|----gift_certificate.gif
|----os28004_b.gif
|----os28005_b.gif
|----os28006_b.gif
|----os28007_b.gif
|----os28008_b.gif
|----os28009_b.gif
|----os28011_b.gif
|----os28044_b.gif
|----os28057a_b.gif
|----os28057b_b.gif
|----os28057c_b.gif
|----os28062_b.gif
|----os28064_b.gif
|----os28065_b.gif
|----os28066_b.gif
|----os28068_b.gif
|----os28068a_b.gif
|----os28068b_b.gif
|----os28069_b.gif
|----os28070_b.gif
|----os28072_b.gif
|----os28073_b.gif
|----os28074_b.gif
|----os28075_b.gif
|----os28076_b.gif
|----os28077_b.gif
|----os28080_b.gif
|----os28081_b.gif
|----os28082_b.gif
|----os28084_b.gif
|----os28085_b.gif
|----os28086_b.gif
|----os28087_b.gif
|----os28108_b.gif
|----os28109_b.gif
|----os28110_b.gif
|----os28111_b.gif
|----os28112_b.gif
|----os28113_b.gif
|----os29000_b.gif
|----products/
|----affiliate.txt
|----area.txt
|----cat.txt
|----inventory.txt
|----merchandising.txt
|----mv_metadata.asc
|----options.txt
|----orderline.txt
|----pricing.txt
|----products.txt
|----transactions.txt
|----userdb.txt
!endblock
H2: Themes
This section explains how themes are defined in Interchange via the
STYLE variable and the theme configuration file, theme.cfg.
H3: STYLE
The STYLE variable in CATROOT/products/variable.txt indicates the
template style to be used as the theme for the catalog; the
appropriate templates for that theme are found in
CATROOT/templates/__STYLE__/. (To change the value of the STYLE
variable, either edit variable.txt directly or use the table editor
feature of the admin interface.)
The default theme for Interchange is the Foundation demo; hence, the
STYLE variable is assigned the value 'Foundation' in variable.txt. The
theme is defined in catalog.cfg as N<follows (line numbers added):>
!block example
# Here we set up the catalog theme.
1 ParseVariables Yes
2 ifndef STYLE
3 Variable STYLE default
4 endif
5 include templates/__STYLE__/theme.cfg
!endblock
Variables that make up the look and feel of the STYLE (theme) are
defined in the file CATROOT/templates/foundation/theme.cfg, which is
read by Interchange in line 5 above.
H3: theme.cfg
The file CATROOT/templates/foundation/theme.cfg serves three
N<purposes:>
^ It defines the THEME and THEME_IMG_DIR variables,
+ It defines a cascading style sheet for the theme, and
+ It defines the location of region templates according to the traffic
settings for the Interchange daemon.
The THEME variable is used to set the location of the region templates
in the traffic settings section of the theme.cfg file. It is also used
in the cart template definition file (CATROOT/templates/cart) to set
the path of an image. The THEME_IMG_DIR variable is used to set image
paths in the template region files and the template component files.
The look and feel of the Foundation theme are defined primarily in the
cascading style sheet specified in the theme.cfg file. This
The Interchange TRAFFIC setting, defined system-wide in
interchange.cfg, is described in the ??document??. The settings in
theme.cfg pertain to the location of region templates for the high and
low traffic settings. For example, if you need to define a separate
set of high traffic templates, you would change the ConfigDir variable
in theme.cfg to point to the directory containing those templates.
H2: Template Definition Files
The template definition files store the name and description of the
template as well as components and options for that template.
!block example
templates/cart
templates/fullwidth
templates/leftonly
templates/leftright
templates/foundation/cart
templates/foundation/fullwidth
templates/foundation/leftonly
templates/foundation/leftright
templates/foundation/simple
!endblock
H3: Template Walkthrough -- leftonly
This section is best read while viewing the file
CATROOT/templates/leftonly and the 'Edit Page' page in the Content
Editor of the Interchange Administration Tool.
Looking at the example template definition file, all lines located
between the E<lbracket>comment] and E<lbracket>/comment] tags (lines 1 and 53) control what is
available in the Edit Page screen of the Administration Tool.
B<Lines 2-5:> Template specification
!block example
2 ui_template: Yes
3 ui_template_name: leftonly
4 ui_template_layout: LEFTONLY_TOP, UI_CONTENT, LEFTONLY_BOTTOM
5 ui_template_description: Page with top/left areas.
!endblock
Line 2 indicates that this file is a template for the user
interface. Line 3 names the template, while Line 4 indicates the
regions that comprise the template and that will eventually make up the new
page that is created from the template. Line 5 provides a
description used to identify the template when it appears in a Select Template
pull-down menu on the Edit Page of the Administration Tool. This description can be
changed or modified to better describe a new template or a template that is created from the
stock templates provided with Interchange.
B<Lines 7-8:> Break
!block example
7 break:
8 widget: break
!endblock
This code creates a separation line in the Edit Page between sets of
options. In the default Interchange installation the line is grey,
but the color can be changed.
NoteE<nbspace>E<emdash> Changing
this color applies the change to any catalog served by Interchange.
B<Lines 10-11:> Page Title
!block example
10 page_title:
11 description: Page title
!endblock
This code tells Interchange to display a text field on the Edit Page
for entering the page title ('Title of New Page' in this
example). The value entered is assigned to the scratch variable
page_title and is set as a default value at the bottom of the template
definition file using the following N<ITL:>
!block example
54 [set page_title][set]
!endblock
which, in turn, sets the scratch variable on the new page using the
tag
!block example
[set page_title]Title of New Page[set]
!endblock
The scratch variable page_title is parsed by the following code in the
region template specified in the template definition file and called
in the new N<page:>
!block example
<title>[scratch page_title]</title>
!endblock
B<Lines 13-15:> Page Banner
!block example
13 page_banner:
14 description: Page banner
15 help: Defaults to page title
!endblock
Assigns a textual title for the page to the scratch variable
page_banner, which is assigned by the following N<ITL:>
!block example
55 [set page_banner][set]
!endblock
The scratch variable page_banner is set on the new page using the tag
!block example
[set page_banner]Banner of New Page[set]
!endblock
The scratch variable can be parsed in the region template by this
N<code:>
!block example
[either]
[scratch page_banner]
[or]
[scratch page_title]
[/either]
!endblock
This results in the page banner being displayed if defined. Otherwise,
the page title is used.
B<Lines 17-20:> Members Only
!block example
17 members_only:
18 options: 1=Yes,0=No*
19 widget: radio
20 description: Members only
!endblock
This creates a radio-button form element on the Edit Page with the
user can specify whether the page can be accessed if a visitor is
logged in (Yes) or not (No). The default is indicated by an asterisk.
The scratch variable members_only is assigned by the ITL code
!block example
56 [set members_only][set]
!endblock
and set on the new page using the tag
!block example
[set members_only]0[/set]
!endblock
if the page can be accessed without logging in or
!block example
[set members_only]1[/set]
!endblock
if it can not.
The members_only function is handled by the following code within each
region template N<file:>
!block example
[if scratch members_only]
[set members_only][/set]
[if !session logged_in]
[set mv_successpage]@@MV_PAGE@@[/set]
[bounce page=login]
[/if]
[/if]
!endblock
This code says that if "members only" is set to yes, and the visitor is logged
in, to display the page. Otherwise, redirect the visitor to the login
page.
B<Lines 22-23:> Break
!block example
22 break1:
23 widget: break
!endblock
Another separation line.
B<Lines 25-28:> Horizontal Before Component
!block example
25 component_before:
26 options: =none, best_horizontal=Best Sellers, \
cross_horizontal=Cross sell, \
promo_horizontal=Promotion, \
random_horizontal=Random items, \
upsell_horizontal=Upsell
27 widget: select
28 description: Component before content
!endblock
This allows the inclusion of a defined component (included in the
CATROOT/templates/components directory) to be displayed before, or
above, the page's content. It provides a pull-down menu on the Edit
Page displaying the available components. The components, identified
here on line 26, can be assigned a name via the value=name convention.
The scratch variable component_before is assigned in the template
definition file by the ITL code
!block example
57 [set component_before][set]
!endblock
It is called with the following code within the LEFTRIGHT_TOP,
LEFTONLY_TOP, and NOLEFT_TOP region N<templates:>
!block example
[if scratch component_before]
[include file="templates/components/[scratch component_before]"]
[/if]
!endblock
B<Lines 30-33:> Horizontal After Component
!block example
30 component_after:
31 options: =none, best_horizontal=Best Sellers, \
cross_horizontal=Cross sell, \
promo_horizontal=Promotion, \
random_horizontal=Random items, \
upsell_horizontal=Upsell
32 widget: select
33 description: Component after content
!endblock
Similar to component_before, this allows the inclusion of a defined
component after, or below, the page's content.
The scratch variable component_before is assigned in the template
definition file by the ITL code
!block example
58 [set component_after][set]
!endblock
It is called with the following code within the LEFTRIGHT_BOTTOM and
LEFTONLY_BOTTOM region N<templates:>
!block example
[if scratch component_after]
[include file="templates/components/[scratch component_after]"]
[/if]
!endblock
B<Lines 35-38:> Horizontal Item Width
!block example
35 component_hsize:
36 options: 1,2,3*
37 widget: select
38 description: Component items horizontal
!endblock
This setting allows you to choose how many items the horizontal
components display. For example, the horizontal best sellers component
("best_horizontal") uses this setting to randomly select the best
sellers. Notice the default is 3 if nothing is defined. It is called
by the following code in the promo_horizontal and random_horizontal
components in the Foundation demo.
!block example
random="[either][scratch component_hsize][or]2[/either]"
!endblock
B<Lines 40-45:> Before/After Banner
!block example
40 hbanner:
41 options: =--custom--, Also see..., Best Sellers, \
New items, \
Some of our fine products, \
Specials, You might also like
42 widget: move_combo
43 width: 40
44 description: Before/after Banner
45 help: Banner for Before/after component
!endblock
Allows a title for the horizontal components to be defined to be
displayed in a header above the component's items. It is called with
the E<lbracket>scratch hbanner] tag and used in the Foundation demo in the
random_horizontal component.
B<Lines 47-51:> Special Tag
!block example
47 hpromo_type:
48 options: specials=Specials, new=New items
49 widget: select
50 description: Special tag
51 help: Only for a horizontal Promotion
!endblock
This setting is only viable when a promotion is used for a horizontal
component. It tells the promotional component which row(s) to evaluate
in the merchandising table for display within the component. This
setting, used in the promo_horizontal component, typically correlates to
the featured column of the merchandising table as N<follows:>
!block example
[query arrayref=main
sql="
SELECT sku,timed_promotion,start_date,finish_date
FROM merchandising
WHERE featured = '[scratch hpromo_type]'
"]
[/query]
!endblock
H2: Edit Page Function
Creating a page with the following specifications using the Edit
Page function results in the HTML and ITL code displayed below.
B<Specifications:>
!block example
Template: Page with top/left areas.
Page title: test
Page banner: test
Members only: No
Component before content: Best Sellers
Component after content: Random items
Component items horizontal: 3
Before/after Banner: New items
Special tag: Specials
Content: <P>My first HTML/ITL page!
!endblock
B<Resulting code:>
!block example
[comment]
ui_template: Yes
ui_template_name: leftonly
[/comment]
[set hbanner]New items[/set]
[set page_title]test[/set]
[set hpromo_type]specials[/set]
[set component_hsize]3[/set]
[set page_banner]test[/set]
[set members_only]0[/set]
[set component_before]best_horizontal[/set]
[set component_after]random_horizontal[/set]
@_LEFTONLY_TOP_@
<!-- BEGIN CONTENT -->
<P>My first HTML/ITL page!
<!-- END CONTENT -->
@_LEFTONLY_BOTTOM_@
!endblock
An important point demonstrated here is the inclusion of the region templates LEFTONLY_TOP
and LEFTONLY_BOTTOM through the @_VARIABLE_NAME_@ notation. These are
included because of line 4 of the leftonly template definition
N<file:>
!block example
4 ui_template_layout: LEFTONLY_TOP, UI_CONTENT, LEFTONLY_BOTTOM
!endblock
However, understand that you are free to change the region templates used in
the file by editing the file itself or, better yet, using an
existing region as a starting point for a region of your own design.
The next section explains the structure of region templates.
H2: Region Templates
Interchange region templates (or "regions") are portions of HTML and ITL
that are included in pages within a catalog. Using regions, along with
the cascading style sheet defined in theme.cfg,
allows you to control the look and feel of specific parts of each
catalog page.
The default Foundation region set, found in
CATROOT/templates/foundation/regions, includes the N<following:>
!block example
LEFTONLY_TOP
LEFTONLY_BOTTOM
LEFTRIGHT_TOP
LEFTRIGHT_BOTTOM
NOLEFT_TOP
NOLEFT_BOTTOM
!endblock
The Foundation demo uses the Variable feature extensively to simplify
hand page editing. Basically, a Variable is a define that permits the
substitution of text for a simple __VARIABLE__ string in a page. For
example, in the test page above, the variables LEFTONLY_TOP and
LEFTONLY_BOTTOM correspond to region templates that provide a logobar,
menubar, leftside menu, and copyright footer. Content, consisting of
HTML and ITL, is placed within the BEGIN and END CONTENT comments. The
following illustration shows how this looks on the N<page:>
!block example
+--------------------------------------------------------+
| LOGOBAR |
|--------------------------------------------------------+
| MENUBAR |
|--------------+-----------------------------------------+
| | |
| | |
| | |
| LEFTSIDE | This is your content |
| | |
| | |
| | |
| +-----------------------------------------|
| | COPYRIGHT |
+--------------------------------------------------------+
!endblock
In this diagram, LEFTONLY_TOP contributes the LEFTSIDE, LOGOBAR, and
MENUBAR sections, while LEFTONLY_BOTTOM contributes the COPYRIGHT
section.
The following subsections provide an inventory of where each of the
region templates, included with the Foundation demo, are used in the
pages and template definition files that make up the catalog.
H3: LEFTONLY_TOP
The LEFTONLY_TOP template region is used in the following template
N<pages:>
!block example
pages/aboutus.html
pages/account.html
pages/affiliate/index.html
pages/affiliate/login.html
pages/canceled.html
pages/contact.html
pages/customerservice.html
pages/flypage.html
pages/help.html
pages/login.html
pages/logout.html
pages/modular_modify.html
pages/new_account.html
pages/ord/basket.html
pages/privacypolicy.html
pages/process_return.html
pages/quantity.html
pages/query/check_orders.html
pages/query/order_detail.html
pages/query/order_return.html
pages/returns.html
pages/saved_carts.html
pages/ship_addresses.html
pages/ship_addresses_added.html
pages/ship_addresses_removed.html
pages/stock-alert-added.html
pages/stock-alert.html
!endblock
The LEFTONLY_TOP template region is used in the following N<templates:>
!block example
templates/foundation/cart
templates/foundation/leftonly
templates/foundation/simple
!endblock
H4: Region Template Walkthrough -- LEFTONLY_TOP
!block example
1 <!-- BEGIN LEFTONLY_TOP -->
2 [if scratch members_only]
3 [set members_only][/set]
4 [if !session logged_in]
5 [set mv_successpage]@@MV_PAGE@@[/set]
6 [bounce page=login]
7 [/if]
8 [/if]
9
10 <html>
11 <head>
12 <title>[scratch page_title]</title>
13 __THEME_CSS__
14 </head>
15
16 <body marginheight="0" marginwidth="0">
17
18 <!--- top left and right logo --->
19 <table width="100%" border="0" cellspacing="0" cellpadding="0">
20 <tr>
21 <td align="left" valign="middle" class="maincontent">
22 <img src="__THEME_IMG_DIR____LOGO__">
23 </td>
24 <td align="right" valign="middle" class="maincontent">
25 <img width="174" height="60" src="__THEME_IMG_DIR__logo2.gif">
26 </td>
27 </tr>
28 </table>
29
30 <!--- menu bar along the top --->
31 <table width="100%" border="0" cellspacing="0" cellpadding="0">
32 <tr>
33 <td width="100%" class="menubar">
34 <a href="[area index]"> \
<img name="Home" border="0" src="__THEME_IMG_DIR__home.gif"></a>
35 <img src="__THEME_IMG_DIR__sep.gif">
36 <a href="[area login]">
37 [if session logged_in]
38 <img alt="Log Out" border="0" src="__THEME_IMG_DIR__logout.gif"></a>
39 [else]
40 <img alt="Log In" border="0" src="__THEME_IMG_DIR__login.gif"></a>
41 [/else]
42 [/if]
43 <img src="__THEME_IMG_DIR__sep.gif">
44 <a href="[area ord/basket]">
<img alt="Your Cart" border="0" src="__THEME_IMG_DIR__cart.gif"></a>
45 <img src="__THEME_IMG_DIR__sep.gif">
46 <a href="[area ord/checkout]"> \
<img alt="Check Out" border="0" src="__THEME_IMG_DIR__checkout.gif">\
</a>
47 <img src="__THEME_IMG_DIR__sep.gif">
48 <a href="[area customerservice]">
<img alt="Customer Service" border="0"
src="__THEME_IMG_DIR__service.gif"></a>
49 <img src="__THEME_IMG_DIR__sep.gif">
50 <a href="[area aboutus]">
<img alt="About Us" border="0"
src="__THEME_IMG_DIR__about.gif"></a>
51 </td>
52 </tr>
53 </table>
54
55 <!--- left category column, main content column, and right special column --->
56 <table width="100%" border="0" cellspacing="0" cellpadding="0">
57 <tr>
58 <td width="20%" valign="top" align="left" class="categorybar">
59 <!--Left Sidebar-->
60 <table width="100%" border="0" cellspacing="0" cellpadding="0">
61 [include file="templates/components/[control component none]"][control]
62 [include file="templates/components/[control component none]"][control]
63 [include file="templates/components/[control component none]"][control]
64 </table>
65 </td>
66 <td width="80%" valign="top" align="center" class="maincontent">
67 [include file="templates/components/[control component none]"][control]
68
!endblock
H3: LEFTONLY_BOTTOM
The LEFTONLY_BOTTOM template region is used in the following template N<pages:>
!block example
pages/aboutus.html
pages/account.html
pages/affiliate/index.html
pages/affiliate/login.html
pages/canceled.html
pages/contact.html
pages/customerservice.html
pages/flypage.html
pages/help.html
pages/login.html
pages/logout.html
pages/modular_modify.html
pages/new_account.html
pages/ord/basket.html
pages/privacypolicy.html
pages/process_return.html
pages/quantity.html
pages/query/check_orders.html
pages/query/order_detail.html
pages/query/order_return.html
pages/returns.html
pages/saved_carts.html
pages/ship_addresses.html
pages/ship_addresses_added.html
pages/ship_addresses_removed.html
pages/stock-alert-added.html
pages/stock-alert.html
!endblock
The LEFTONLY_BOTTOM template region is used in the following N<templates:>
!block example
templates/foundation/cart
templates/foundation/leftonly
templates/foundation/simple
!endblock
H3: LEFTRIGHT_TOP
The LEFTRIGHT_TOP template region is used in the following template N<pages:>
!block example
pages/browse.html
pages/index.html
pages/results.html
pages/results_big.html
pages/swap_results.html
!endblock
The LEFTRIGHT_TOP template region is used in the following N<templates:>
!block example
templates/foundation/leftright
!endblock
H3: LEFTRIGHT_BOTTOM
The LEFTRIGHT_BOTTOM template region is used in the following template N<pages:>
!block example
pages/browse.html
pages/index.html
pages/results.html