• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4358: RFE: Support for User-defined Macro Variables

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Enhancement No Action Required   n/a  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


Users can create variables, but these are simple 1-value things.

TWiki pre-defined variables, however, often act like simple functions, or at least macros, with parameters.

I would love to see TWiki provide support for users to create macros.


I do a lot of pattern-based includes. Before INCLUDE sections were implemented, this was the only way to get a piece of a page (and is probably still the only way to get a piece of an external page).

So, I have a lot of this sort of code

%INCLUDE{"TOPIC" pattern="^.*<\!-- BEGIN_PATTERN -->(.*?)<\!-- END_PATTERN -->.*"}%

It would be great if I could write something like this to hold all of the repetitive goo

   * MACRO FOO = %%INCLUDE{%ARG% pattern="^.*<\!-- %ARG% -->(.*?)<\!-- %ARG% -->.*"}%

and then evaluate this later as


Note that the MacrosPlugin and couple of other plugins provide support for this sort of thing.

While I sympathise with your desire to keep everything in one place, the TWiki community has decided to keep RFEs in the Codev web until they have been agreed. Please raise this in Codev, and while you are doing it bear in mind that TWiki:Main.MichaelDaum has been asking for exactly the same thing, and may have already created a Codev topic.

Closed for now. Please reopen when it's an agreed feature.


Summary RFE: Support for User-defined Macro Variables
ReportedBy TWiki:Main.VickiBrown

SVN Range TWiki-4.1.2, Thu, 28 Jun 2007, build 14298
AppliesTo Engine

Priority Enhancement
CurrentState No Action Required


TargetRelease n/a

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r2 - 2007-07-15 - TWikiUserMapping_CrawfordCurrie
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback