<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">

  <xi:include href="master.html" />

<head>
  <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
  <title>Learning TurboGears 2.0: Quick guide to the Quickstart pages.</title>
</head>

<body>
    <h2>Content Type Dispatch</h2>
    <p>
    This page shows how you can provide multiple pages
    directly from the same controller method.  This page is generated 
    from the expose decorator with the template defintion provided.
    You can provide a url with parameters and this page will display
    the parameters as html, and the json version will express
    the entries as JSON.
    
    </p>
    
    <p>Click here for the <a href="${tg.url('/data.json', params=params)}">JSON Version of this page.</a></p>
    <p>The data provided in the template call is: 
    <table>
        <py:for each="key, value in params.iteritems()">
        <tr>
            <td>${key}</td>
            <td>${value}</td>
        </tr>
        </py:for>
    </table>

    </p>
</body>
</html>
