User Manual table of contents

Generate multiple Web configurations using pop!siteTM

On this Page
See Also


Quick Reference
Object Types
System Properties
System Methods
Binary Operators


I would like to use one set of pop!site source files to generate multiple sets of Web documents, each customized for a specific purpose. How can pop!site help?


Use pop!site's system property &(config); to build multiple versions of a static web site.


  1. For example, you would like to build a product information Web site with two versions -- one for internal viewing and one for the general public. If the information on the two versions are mostly the same except for certain variations, you can maintain one set of pop!talkTM source, and use it to generate multiple sets of HTML documents.

    For example:

    pop!site's command line option, -cl, allows you to specify a list of values for the pop!site system property &(config);. When you run pop!site from the command line with the -cl option, &(config); will be set to one of the values in that list, and pop!site will use that value to produce the corresponding HTML file. This process continues until pop!site exhausts all of the values specified in the -cl option.

  2. Let's create a sample pop!talk document which makes use of the system property &(config);, and call it

    <include file="document.pti">
    <document doctitle="Fancy Widget Product Page"> <p>On this page, we'll tell you all about our Fancy Widget product. <p>Everyone will want to know:
    <li>and this

    <if &(config == "Public")>
    For information about the nearest place to buy a Fancy Widget, call 1-800-555-1212.

    <if &(config == "Internal")>
    We just started selling the new one of these. There's an internal sales promotion going on -- sell 10 this month and you'll get a 20% bonus. Go team!


    There are two conditional tests in the above example:
    • if &(config); equal to "Public", then the text "For more information about the nearest place...." will be generated.
    • if &(config); equal to "Internal", then the text "We just started selling the new one of these...." will be generated.

  3. To run pop!site, we will enter the following at the DOS prompt:

    pt -i -o Publish\ -cl Public,Internal -ce

    We can take a look at how the command line switches are used in the above example:
    • -i specifies that the input file is
    • -o specifies that the output should be directed to the \Publish\ directory
    • -cl is followed by two text strings (separated by a comma), Public and Internal -- these will be used as the values for setting the system property &(config);
    • -ce indicates that the output directories for each &(config); string will be generated as a subdirectory of the Publish directory

    The above command line input to pop!site will trigger pop!site to run two times: the first time, &(config); is set to Public and the output will be generated in the Publish\Public directory. The second time, &(config); is set to Internal and the result will be generated in the Publish\Internal directory.

  4. Thus the folder hierarchy looks like this:

  5. Click here to see mydoc.html in the Publish\Public folder. Click here to see mydoc.html in the Publish\Internal folder.


In addition to -cs, there are two switches, -ce and -cm, which you can use to specify where you wish to append the name of the configuration to the output directory name. The -cm switch will insert the directory in the middle (after the -o path, but before any additional recursed folders). The -ce switch will add the directory at the end of the output path (after any additional recursed folders).

See Also

Command-Line Operation of pop!site


powered by pop!site Copyright 1995-1997. Pragmatica, Inc. All Rights reserved.
Pragmatica, pop!site and pop!talk are trademarks of Pragmatica, Inc.
Modified: 10 March, 1997 12:53:27

Page Feedback
Webmaster Contact