That is where template files come into place. You might remember that you've already specified a directory where those files reside in the configuration section of this documentation.
Using template files is pretty straight forward. Simply create a HTML file named after the table which it shall be used for (with extension .html) and store it in your template directory.
dbengine will look for such a file before it generates its HTML output and if it finds your template there will be no more automatic page generation.
A template file for our test database articles would be names articles.html and stored in the template directory.
This feature will only work in case you DON'T USE ANY VALUE-TAGS IN YOUR FORMS.
Any server side includes will be executed and their calls substituted by their results.
<--**and ending with
-->to insert Perl code into your Web pages.
variable | type | use |
$query | CGI | $query is initialized with the arguments from the last call of our CGI |
$table | char | the name of the table we're currently working with |
$conn | DBI | Database handle to our main database (where $table lives) |
$dconn | DBI | Database handle to our description database |
%values | associative array | If a record has been opened for display this array will contain all it's fields, so that you can access a fields value by $values{'nameOfField'}. This is also true for virtual Fields. |
There are also some useful routines available that make live easier:
name | arguments | use |
callDBaseSub | $theName, $arguments | callDBaseSub scans the equation database for an entry with name $theName and executes its code
which is given all further $arguments. If there occurs any error $@ is set to the error message and undef is returned. Otherwise the routine returns whatever value the last expression of our routine has. |
valueListPopup | fieldName | creates a simple HTML popup menu with name $name that displays all the values specified in the valuelist table of our display description database for this specific fieldName. |
relationPopup | $name, $relTable, $relField | creates a simple HTML popup menu with name $name that displays all the different values in $relField from table $relTable in the main database |
tablePopup | $name | creates a simple HTML popup with name $name menu that displays all available tables in the main database |
xChop | $aString | xChop returns the given $aString without any training blanks |
This modified FORM ACTION should be used to make sure that dbengine.cgi will always be found: