Edgewall Software

Changes between Version 52 and Version 53 of TracModPython


Ignore:
Timestamp:
Dec 4, 2005, 6:55:05 PM (18 years ago)
Author:
Pedro Algarvio <ufs@…>
Comment:

Added the example posted on the mailing list about Custom Projects Index

Legend:

Unmodified
Added
Removed
Modified
  • TracModPython

    v52 v53  
    104104}}}
    105105
     106
     107=== Custom Projects Index ===
     108In case you have multiple projects set up under a VHost, you can now have a custom ClearSilver template for your projects index. Here's an example posted by Matthew Good on the mailling list:
     109{{{
     110#!text/html
     111<html>
     112<head><title>Available Projects</title></head>
     113<body><h1>Available Projects</h1><ul><?cs
     114 each:project = projects ?><li><?cs
     115  if:project.href ?>
     116   <a href="<?cs var:project.href ?>" title="<?cs var:project.description ?>">
     117    <?cs var:project.name ?></a><?cs
     118  else ?>
     119   <small><?cs var:project.name ?>: <em>Error</em> <br />
     120   (<?cs var:project.description ?>)</small><?cs
     121  /if ?>
     122  </li><?cs
     123 /each ?></ul></body>
     124</html>
     125}}}
     126
     127This should get you started. The only thing you need to do now is edit your apache configuration file and add:
     128{{{
     129PythonOption TracEnvIndexTemplate /path/to/template
     130}}}
     131
     132
    106133== Troubleshooting ==
    107134