Webgenz
  Product Overview News & Events Support

 

Project Files


The Project Definition File is used to manage all information related to a specific Project. It is conceptually similar to a "make file" used by many programming languages. In addition to listing all of the HTML Documents in a Project, the Project Definition File also describes the inheritance hierarchy of Content Files and Macros.

The format of the Project Definition File is as follows:

     Globals=GlobalContentFile1,...,GlobalContentFileN!
     
     [Folder1]
     Globals=Folder1ContentFile1,...,Folder1ContentFileN!
     DocumentFile1,TemplateFile1,ContentFile11,...,ContentFile1N!
     DocumentFile2,TemplateFile2,ContentFile21,...,ContentFile2N!
     ...
     DocumentFileN,TemplateFileN,ContentFileN1,...,ContentFileNN!
     
     [Folder2]
     Globals=Folder2ContentFile1,...,Folder2ContentFileN!
     DocumentFile1,TemplateFile1,ContentFile11,...,ContentFile1N!
     DocumentFile2,TemplateFile2,ContentFile21,...,ContentFile2N!
     ...
     DocumentFileN,TemplateFileN,ContentFileN1,...,ContentFileNN!
     
     ...
     
     [FolderN]
     Globals=FolderNContentFile1,...,FolderNContentFileN!
     DocumentFile1,TemplateFile1,ContentFile11,...,ContentFile1N!
     DocumentFile2,TemplateFile2,ContentFile21,...,ContentFile2N!
     ...
     DocumentFileN,TemplateFileN,ContentFileN1,...,ContentFileNN!
     
     !
     
The description above is a generalized template for the Project Definition File. Since many of the files in this template are optional, an actual Project Definition File will be much more concise. Here is an example of a Project Definition File for a simple Webgenz Project:
     # This is a comment
     Globals=userguide.par!
     
     [Index]
     index.html,index.tpl,index.par!
     
     [Chapters]
     Globals=doc.par!
     overview.html,doc.tpl,overview.par!
     projects.html,doc.tpl,projects.par!
     templates.html,doc.tpl,templates.par!
     content.html,doc.tpl,content.par!
     !
     

Notes:

  • Global Content Files are defined by placing "Globals=" on the start of a line at the top of the file. The Macros in these Content Files are global in scope and can be referenced by any Template or Content File in the Project.
     
  • Folders are defined by placing the name of a folder between brackets (i.e. [FolderName]) on its own line. In the example above, the Folders "Index" and "Chapters" are defined. (Note: Webgenz Folders have no direct relationship with Windows Folders. However, you may decide to structure your Project so that they do. Webgenz Folders are simply a mechanism that allows you to logically divide a Project into sections).
     
  • Folder Content Files are defined by placing "Globals=" on the start of a line right after a Folder definition. The Macros defined in Folder Content Files have a scope that is limited to the Folder where they are defined. In other words, the Macros in Folder Content Files can be referenced by any Templates or Content Files defined within the Folder.
     
  • Documents listed under a Folder are defined as follows:

    DocumentFile,TemplateFile,ContentFile1,...,ContentFileN!

    where TemplateFile, and ContentFile1 thru ContentFileN are optional.

    You may list as many Content Files as you wish for each Document. The Macros defined in these Content Files are specific to the Document defined on the same line. The Macros in these files have a "local" scope.
     

  • Inheritance Hierarchy - The basic functionality of Webgenz is to generate Documents from Templates and Content Files. During this Document generation process Webgenz replaces Macro references with the definitions of those Macros. As Webgenz searches for a Macro definition it will search Content Files in a specific order. The order that Webgenz searches Content Files is determined by the inheritance hierarchy. The inheritance hierarchy of Content Files is as follows:

    More Specific











    More General
    Project Macro File (if one has been defined)
    --
    ContentFile1
    ...
    ContentFileN
    --
    FolderContentFile1
    ...
    FolderContentFileN
    --
    GlobalContentFile1
    ...
    GlobalContentFileN

    Note: You can define a single Project Macro File in the "Advanced" tab of the "Project Properties" screen. The Macros defined in the Project Macro File will take precedence over Macros defined in all other Content Files.

    When Webgenz searches for a Macro Definition, it begins by searching the more specific Content Files and then continues searching the more general Content Files until the Macro Definition is found. As soon as Webgenz finds the Macro definition, it stops searching.

Additional notes on format of the Project Definition File:

  • Blank lines in the file are ignored.
     
  • Spaces before or after a file name are ignored.
     
  • Each Document line ends with "!".
     
  • Comments are added to the file by including "#" at the start of a line.
     
  • The end of a Project can be specified by including "!" at the start of a line.
     
  • The files used in a Project cannot contain the "!" character in their names.
     
  • The general convention is that Templates use the ".tpl" extension and Content Files use the ".par" extension. However, you may use any naming convention you wish.
  • Here's a sample of a Project Definition File:



  • Copyright 1997-2003. All rights reserved. Webgenz is a trademark. Last updated: Monday, March 08, 2004