Version 7 (modified by figaro, 2 years ago) (diff)

Hosted on github

Render Genshi templates directly in wiki pages

Notice: This plugin has not been developed with security considerations in mind.


The GenshiMacro allows you to write and render Genshi templates directly in wiki pages with a new Genshi processor.

Your templates will have access to the request as req, which can be useful for tasks like URL generation, rendering form tokens for POST requests, and checking for a logged-in user.

Note: no security considerations whatsoever went into the making of this plugin. If you happen to know how it can be improved, please let me know.

Bugs/Feature Requests

Existing bugs and feature requests for GenshiMacro are here.

If you have any issues, create a new ticket.


Download the zipped source from here.


You can clone GenshiMacro from here using Git, or browse the source with Github.

Configuration and Usage

To use the plugin, install it in your Trac environment and enable its components in trac.ini:

genshimacro.* = enabled

You can then write Genshi templates directly in wiki pages.


  <div xmlns:py="">
    <py:when test="req.session.authenticated">
     <form method="POST" action="${req.href.newticket()}">
      <input type="text" name="field_summary" placeholder="My new ticket"
             id="field-summary" />
      <input type="hidden" name="__FORM_TOKEN" value="${req.form_token}" />
      <input type="submit" />
     <b>To file a new ticket, you'll need to
        <a  href="${req.href.login()}">log in</a> or
        <a  href="${req.href.register()}">create an account</a>

Recent Changes

11445 by ejucovy on 2012-04-02 13:02:50
New hack GenshiMacro, created by ejucovy


Author: ejucovy
Maintainer: ejucovy