Home Table of Contents Download and install CCHelper CCHelper On-line Reference Manual Getting Started with CCHelper Available upgrades to the CCHelper software Subscribe or send message to one of the CCHelper
Lists Frequently Asked Questions

Repeat and If Commands

NOTE: This software and associated documentation are
Copyright © 1997-1998 Patricia A. Lindsay.
Except for the CCHelper Manual written by Carol A. Haagensen


When CCHelper generates HTML, it substitutes the symbolics with data, eg [[resname]] will be replaced with the researcher's name. You may wonder, "How does it determine which researcher?". CCHelper reads through the data in your database based on the REPEAT commands defined in the HTML and then "repeats" a portion of the HTML for each set of data it reads. For example, when you want to specify the HTML that is to be used for each researcher, you use the /[REPEAT FOR EACH RESEARCHER]/ and /[END REPEAT]/ commands. Here's an example from the "res. body" HTML section in CCHelper that illustrates the REPEAT command as well as the IF command.

TextComment
<center>RESEARCHERS: [[atozres]]</center><br> This text does not repeat, it only appears once on each page, because it is before the REPEAT command.
/[REPEAT FOR EACH RESEARCHER]/ This says "repeat the following line(s) for each researcher".
[[atoztag]] [[Tag]] <h3>[[ResName]]</h3> <ul>
/[ IF ResEmail EXISTS ]/ This says "only do the following line(s) if this researcher has an e-mail address".
<li> Email: <a href="mailto:[[resemail]]">[[resemail]]</a>
/[ ENDIF]/
/[ IF ResWebPage EXISTS ]/ This says "only do the following line(s) if this researcher has a Web page."
<li> Personal Web Page: <a href=" [[ResWebPage]]"> [[ResWebPage]] </a>
/[ ENDIF]/
/[ IF ResNote EXISTS ]/ This says "only do the following line(s) if this researcher has an note".
<li> Other: [[ResNote]] </a>
/[ ENDIF]/
/[REPEAT FOR EACH REGISTRATION]/ This is a repeat inside of a repeat, in this case it says "repeat the following line(s) for each surname registration for the current researcher".
<li> Registered surname(s) [[surline]] on [[postdate]]
/[END REPEAT This ends the repeat for the surname registration.
/[REPEAT FOR EACH QUERY]/ This says "repeat the following line(s) for each query for the current researcher".
<li> Posted <a href="[[QryRef]]">Query</a> on [[postdate]] for surname(s) [[surline]]
/[END REPEAT]/ This ends the repeat for the query.
</UL>
/[END REPEAT]/ This ends the repeat for the researcher.

Note that commands are enclosed with /[ and ]/. You can find more information about commands in CCHelper under "Help", "Command Help".


Home      Table of Contents     
Install Win 3.1      Install Win 95      Reference Manual      Getting Started     
Upgrade       Support       FAQs      Surname Helper      

Copyright © 1997-1998 Patricia A. Lindsay. All rights reserved.
Patty Lindsay
plindsay@infinet.com