Changes between Version 1 and Version 2 of WikiLastModifiedPatch


Ignore:
Timestamp:
Dec 12, 2008 10:59:04 AM (6 years ago)
Author:
izzy
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiLastModifiedPatch

    v1 v2  
    2323== Example == 
    2424 
     25This example shows how to add the "Last Modified" information to your `site.html` file (see also: http://trac.edgewall.org/wiki/TracInterfaceCustomization). I left the "site-specific footer" code from the original site template in here to make clear at what place the "last modified" code should go. Of course, you may chose a different text (e.g. localized to your language). 
    2526{{{ 
    2627#!xml 
    27     <!--! Wiki Footer (last_modified info) --> 
    28     <div py:match="div[@id='content' and @class='wiki']" py:attrs="select('@*')"> 
     28    <!--! Wiki Footer (last_modified info) --> 
     29    <div py:match="div[@id='content' and @class='wiki']" py:attrs="select('@*')"> 
    2930      ${select('*')} 
    30       &lt;div class=&#34;lastmodified&#34;&gt;Last modified by ${authorinfo(page.author)}, ${format_datetime(page.time)} (${dateinfo(page.time)} ago)&lt;/div&gt; 
    31     &lt;/div&gt; 
     31      <div class="lastmodified">Last modified by ${authorinfo(page.author)}, ${format_datetime(page.time)} (${dateinfo(page.time)} ago)</div> 
     32    </div> 
    3233 
    3334    ${select('*|text()')} 
    3435 
    35     &lt;!--! Add site-specific footer --&gt; 
    36     &lt;div id=&#34;sitefooter&#34;&gt; 
    37       &lt;!--! Place your footer content here... --&gt; 
    38     &lt;/div&gt; 
     36    <!--! Add site-specific footer --> 
     37    <div id="sitefooter"> 
     38      <!--! Place your footer content here... --> 
     39    </div> 
     40}}} 
     41 
     42Some CSS definitions you may want to add to your style sheet: 
     43{{{ 
     44#!css 
     45div.lastmodified { 
     46 font-style:italic; 
     47 font-size: 80%; 
     48 text-align: center; 
     49} 
    3950}}} 
    4051