Chapter 2 Getting Started with PowerDynamo
In this tutorial, you create an HTML template that includes a SQL query. A Web client accessing this template receives the formatted results of the SQL query.
To add a template to your Web site:
Products
.
Do not use any spaces. Click Next.
A
test template
. Click Next.
You can display the HTML in the Sybase Central syntax-highlighting editor. The editor color-codes HTML tags, SQL syntax, and script syntax, making editing and viewing of templates easier.
Templates are created with default extensions of .stm. We recommend that you keep this extension for all your templates.
The query and formatting instructions are included in the HTML as specially formatted HTML comments.
To view the template output:
The output displays the formatted results of the query instead of the query and the formatting instructions.
You can also send the output to your browser by selecting Browse Output from the pop-up menu.
To edit the template using the Sybase Central editor:
Table of Products
Save templates to a database
Make sure that you save the template
to the database.
Dynamic content is embedded in an HTML template as HTML comments. This allows you to use Web page authoring tools to refine the static components of your Web pages without interfering with the dynamic content.
An HTML comment is marked by the following delimiters:
<!-- -->
A SQL statement is identified by a special comment marker, as follows:
<!--SQL select prodname, price from product -->
A SQL statement with formatting instructions is embedded as follows:
<!--SQL select prodname, price from product --> <!--FORMATTING--> ( table instructions here ) <!--/FORMATTING-->
A script is embedded as follows:
<!--SCRIPT document.WriteLn ( "Hello world" ) ; -->
For more information, see "Dynamo Tags" in the PowerDynamo Reference Manual.
Copyright © 2001 Sybase, Inc. All rights reserved. |