| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| <title>Hello World</title> |
| <link rel="stylesheet" href="../css/wondrous/styles.css" type="text/css" /> |
| </head> |
| |
| <body> |
| <div id="container"> |
| <div id="header"> |
| <h1><a href="../index.html">Rivet</a></h1> |
| <h2 id="slogan">Webscripting for Tcl'ers</h2> |
| <div class="clear"></div> |
| </div> |
| <div id="body"> |
| <div id="content"> |
| <h2><headline>Hello World</headline> |
| </h2> |
| <div class="example"> |
| <!-- p class="title"><b>Example 1. Hello World</b></p--> |
| <div class="example-contents"> |
| <p> |
| As with any tool, it's always nice to see something work, so |
| let's create a small "Hello World" page. |
| </p> |
| <p> |
| Assuming you have Apache configured correctly, create a file |
| called <code class="filename">hello.rvt</code> |
| where Apache can find |
| it, with the following content: |
| </p> |
| <pre class="programlisting"><html> |
| <head> |
| <title>Hello World</title> |
| </head> |
| <body> |
| <pre> |
| <b><? puts "Hello world" ?></b> |
| </pre> |
| </body> |
| </html> |
| </pre> |
| <p> |
| The example can be elaborated, for example using the <tt> |
| <a href="http://tcl.apache.org/rivet/manual/html.html">html</a> |
| </tt> |
| command |
| <pre class="programlisting"> |
| <? set hello_message "Hello world" ?> |
| <html> |
| <head> |
| <title><? puts $hello_message ?></title> |
| </head> |
| <body><? |
| puts [html $hello_message pre b] |
| ?></body> |
| </html> |
| </pre> |
| </p> |
| <p> |
| Starting with version 2.0.5 Rivet also supports a shorthand notation |
| to output simple strings. |
| </p> |
| <p> |
| <pre class="programlisting"> |
| <? set hello_message "Hello world" ?> |
| <html> |
| <head> |
| <title><?= $hello_message ?></title> |
| </head> |
| <body><?= [html $hello_message pre b] ?></body> |
| </html> |
| </pre> |
| </p> |
| </div> |
| </div> |
| |
| |
| |
| <div class="contentbottom"> |
| <div id="last_modified">Last Modified: 26-06-2012 21:51:26 UTC</div> |
| </div> |
| </div> |
| |
| <div class="sidebar"> |
| <ul> |
| <li> |
| <h4>News</h4> |
| <ul> |
| <li><span class="newsheader">26 June 2012</span>: <a href="rn-2-0.html">Rivet 2.0.5 released</a></li> |
| <li><span class="newsheader">6 July 2012</span>: <a href="http://www.eurotcl.tcl3d.org/">10th European Tcl/Tk User Meeting</a></li> |
| </ul> |
| </li> |
| <li id="rivetexamples"> |
| <h4 class="">Examples</h4> |
| <ul class="blocklist"> |
| <li class="navitem"> |
| <a href="hello_world.html" class="">Hello world!</a> |
| </li> |
| <li class="navitem"> |
| <a href="shaded_table.html" class="">A shaded table</a> |
| </li> |
| <li class="navitem"> |
| <a href="var_access.html" class="">Variable Access</a> |
| </li> |
| <li class="navitem"> |
| <a href="file_upload.html" class="">File Upload</a> |
| </li> |
| <li class="navitem"> |
| <a href="file_download.html" class="">File Download</a> |
| </li> |
| <li class="navitem"> |
| <a href="ajax.html" class="">XML and Ajax</a> |
| </li> |
| <li class="navitem"> |
| <a href="calendar.html" class="">Calendar</a> |
| </li> |
| </ul> |
| </li> |
| <li id="main"> |
| <h4 class="">Rivet</h4> |
| <ul class="blocklist"> |
| <li class="navitem"> |
| <a href="../index.html" class="">Rivet Homepage</a> |
| </li> |
| <li class="navitem"> |
| <a href="http://tcl.apache.org/" target="asf">Apache Tcl Home</a> |
| </li> |
| <li class="navitem"> |
| <a href="download.html" class="">Getting Rivet</a> |
| </li> |
| <li class="navitem"> |
| <a href="http://tcl.apache.org/rivet/manual/" target="rivetman">Documentation</a> |
| </li> |
| <li class="navitem"> |
| <a href="hello_world.html" class="">Examples</a> |
| </li> |
| <li class="navitem"> |
| <a href="about.html" class="">About Us - Contact</a> |
| </li> |
| </ul> |
| </li> |
| |
| |
| </ul> |
| </div> |
| <div class="clear"></div> |
| </div> |
| </div> |
| <div id="footer"> |
| <div class="footer-content"> |
| <p><a href="http://www.apache.org/">Apache Software Foundation</a> | Design by <a href="http://www.spyka.net">Free CSS Templates</a> | <a href="http://www.justfreetemplates.com">Free Web Templates</a></p> |
| </div> |
| </div> |
| <div style="text-align: center; font-size: 0.75em;">Design downloaded from <a href="http://www.freewebtemplates.com/">free website templates</a>.</div></body> |
| </html> |
| |