When creating a topic from a template, can I make it so that %MACROs% are expanded on save?

Example

%STARTSECTION{type="expandvariables"}%
 [[%WIKIUSERNAME%][%QUERY{'%WIKIUSERNAME%'/FirstName}% %QUERY{'%WIKIUSERNAME%'/LastName}%]]
 created this topic at %SERVERTIME% in %WEB% web when there were %SEARCH{"1" type="query" nonoise="on" format="" footer="$ntopics"}% topics in it
%ENDSECTION{type="expandvariables"}%

There are currently %SEARCH{"1" type="query" nonoise="on" format="" footer="$ntopics"}% topics in %WEB%

IDEA! Note that the SEARCH and WEB macros inside the expandvariables section are expanded on save; whereas the same macros outside of that section, are saved verbatim.

Test

Using Faq58Template:

Created topics

Searched: parent.name='Faq58'
Number of topics: 1

Support.FAQForm edit

TopicClassification FrequentlyAskedQuestion
Subject Editing, Usage
Topic Summary Demonstrate usage of VarSTARTSECTION's expandvariables parameter in topic templates
Extension
Interested Parties
Related Topics TemplateTopics, VarSTARTSECTION
Topic revision: r5 - 27 Dec 2011, ArthurClemens
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy