Changes between Initial Version and Version 1 of GenshiMacro


Ignore:
Timestamp:
Apr 2, 2012, 1:02:55 PM (12 years ago)
Author:
ejucovy
Comment:

New hack GenshiMacro, created by ejucovy

Legend:

Unmodified
Added
Removed
Modified
  • GenshiMacro

    v1 v1  
     1[[PageOutline(2-5,Contents,pullout)]]
     2
     3= Genshi Macro =
     4
     5== Description ==
     6
     7== Genshi processor for wiki pages ==
     8
     9=== Description ===
     10
     11The GenshiMacro allows you to write and render Genshi templates directly
     12in wiki pages with a new ``Genshi`` processor.
     13
     14Your templates will have access to the request as ``req``, which can be
     15useful for tasks like URL generation, rendering form tokens for POST
     16requests, and checking for a logged-in user.
     17
     18'''Note: no security considerations whatsoever went into the making of
     19this plugin.  It might be a terrible idea.  If you happen to know that
     20it is, please let me know.'''
     21
     22=== Configuration and Usage ===
     23
     24To use the plugin, install it in your Trac environment and enable its
     25components in ``trac.ini``::
     26
     27{{{
     28  [components]
     29  genshimacro.* = enabled
     30}}}
     31
     32You can then write Genshi templates directly in wiki pages.
     33
     34
     35== Bugs/Feature Requests ==
     36
     37Existing bugs and feature requests for GenshiMacro are
     38[report:9?COMPONENT=GenshiMacro here].
     39
     40If you have any issues, create a
     41[http://trac-hacks.org/newticket?component=GenshiMacro&owner=ejucovy new ticket].
     42
     43== Download ==
     44
     45Download the zipped source from [download:genshimacro here].
     46
     47== Source ==
     48
     49You can check out GenshiMacro from [http://trac-hacks.org/svn/genshimacro here] using Subversion, or [source:genshimacro browse the source] with Trac.
     50
     51== Example ==
     52
     53{{{
     54#!html
     55 
     56  {{{
     57  #!Genshi
     58  <div xmlns:py="http://genshi.edgewall.org/">
     59   <py:choose>
     60    <py:when test="req.session.authenticated">
     61     <form method="POST" action="${req.href.newticket()}">
     62      <input type="text" name="field_summary" placeholder="My new ticket"
     63             id="field-summary" />
     64      <input type="hidden" name="__FORM_TOKEN" value="${req.form_token}" />
     65      <input type="submit" />
     66     </form>
     67    </py:when>
     68    <py:otherwise>
     69     <b>To file a new ticket, you'll need to
     70        <a href="${req.href.login()}">log in</a> or
     71        <a href="${req.href.register()}">create an account</a>
     72        first.</b>
     73    </py:otherwise>
     74   </py:choose>
     75  </div> 
     76  }}}
     77
     78}}}
     79
     80== Recent Changes ==
     81
     82[[ChangeLog(genshimacro, 3)]]
     83
     84== Author/Contributors ==
     85
     86'''Author:''' [wiki:ejucovy] [[BR]]
     87'''Maintainer:''' [wiki:ejucovy] [[BR]]
     88'''Contributors:'''