|
<<prev |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
next>>
RealCart [Tags] 101 - Registry Tags
Creating Tags out of Registry Branches (continued)
To display your HumanClick ID in your product pages you could add this tag to your product description, the product.html template, or a snippit file:
[UserField_HumanClickID]
This same technique can be used to display any registry value in your finished pages. To display the CopyrightYear, for example, just use this tag:
[UserField_CopyrightYear]
Repeat Tags
Repeat Tags are special Square Tags which will Cycle Through a set of data like all the department names, all tax rates, all shipping methods, etc. Repeat Tags allow the portion of code between them to be repeated for each item in the dataset. For example, department.html templates contain the following:
[DepartmentGroupsLoop_Begin;DepartmentID=%DepartmentID]
and
[DepartmentGroupsLoop_End].
These Repeat Tags allow code to be repeated to be entered only one time as opposed to one time for each product in the department. It works something like this:
<code> that appears only once </code>
<code> that appears only once </code>
<code> that appears only once </code>
[DepartmentGroupsLoop_Begin;DepartmentID=%DepartmentID]
<code> that repeats for each product in dept </code>
<code> that repeats for each product in dept </code>
<code> that repeats for each product in dept </code>
[DepartmentGroupsLoop_End]
<code> that appears only once </code>
<code> that appears only once </code>
<code> that appears only once </code>
As you can see by the above example, everything in the source code BEFORE the repeat tags appears only once on the page. Everything in between the repeat tags appears once for each product in the department. Everything in the source code AFTER the repeat tags appears only once on the page. We will examine repeat tags more in depth in the next course, RealCart Tags Syntax.
<<prev |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
next>>
|