Changes between Version 10 and Version 11 of RegexIncludeMacro


Ignore:
Timestamp:
Oct 5, 2006 3:48:05 PM (8 years ago)
Author:
dfaerch
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RegexIncludeMacro

    v10 v11  
    99 
    1010Arguments: 
    11  * arg 1 :  url - Like the Include macro except, local files cannot be included[[FootNote(Well, they can if the file resides in /tmp/trac_include/ and no slashes are used in filename.)]] 
     11 * arg 1 :  url - Like the Include macro except, local files cannot be included[[FootNote(Well, they can if the file resides in /tmp/trac_include/ and no slashes are used in filename.)]]. Also accepts !wiki:MyPage 
    1212 * arg 2 :  format. Either "wiki" or "raw", where wiki does WikiFormatting 
    1313 * arg 3+:  "Control arguments". See Control Arguments below. 
     
    7676}}} 
    7777 
    78 The next example includes http://www.kernel.org/kdist/finger_banner and wiki-formats the wanted data, and removes the unwanted. Perticulary, i want to only keep the major version information, not patches nor snapshots. 
     78[[BR]] 
     79The next example shows how to use the Control Argument ''use_vars'' to create a personalized start page on the wiki: 
     80{{{ 
     81[[RegexInclude(wiki:StartPage_$USER,wiki,use_vars=lower)]] 
     82}}} 
     83In my case, it would include a page from the wiki called "!StartPage_dfaerch". (and always lowercasing the username). And for anonymous users, it would include "!StartPage_anonymous", unless "no_anon" is defined as well. 
     84 
     85[[BR]] 
     86The last example includes http://www.kernel.org/kdist/finger_banner and wiki-formats the wanted data, and removes the unwanted. Perticulary, i want to only keep the major version information, not patches nor snapshots. 
    7987 
    8088Note how i use 2 regular expression replaces, seperated by ','. The first expression formats the lines i want to keep, the second deletes the rest.