You are here: Foswiki>Tasks Web>Item10187 (12 Apr 2012, PaulHarvey)Edit Attach

Item10187: Support simple macro parameters

pencil
Priority: Enhancement
Current State: Closed
Released In: 1.1.4
Target Release: patch
Applies To: Engine
Component: FoswikiMacros, TopicMarkup
Branches:
Reported By: CrawfordCurrie
Waiting For:
Last Change By: PaulHarvey
This is the checkin task for ParameterizedVariables

This feature is not accepted yet, so any checkins here may be reverted without warning.

-- CrawfordCurrie - 22 Dec 2010

I noticed that I can't do this:

   * Set TOPICTITLE = %IF{"defined 'DEFAULT'" then="defined, expands as %DEFAULT%" else="undefined, expands as %DEFAULT%"}%
   * Set TEST = %IF{"defined 'WEBFORMS'" then="defined" else="undefined"}%
  • TOPICTITLE no param: undefined, expands as %DEFAULT%
  • TOPICTITLE with param: undefined, expands as Support.Faq40
  • TEST: defined

-- PaulHarvey - 15 Jan 2011

%STARTSECTION{"test"}%%IF{
  "defined 'something'"
  then="defined, expands as %something%"
  else="undefined, expands as %something%"
}%%ENDSECTION{"test"}%
   * INCLUDE no param: %INCLUDE{"%TOPIC%" section="test"}%
   * INCLUDE with param: %INCLUDE{"%TOPIC%" section="test" something="boo"}%

  • INCLUDE no param: undefined, expands as %something%
  • INCLUDE with param: defined, expands as boo

-- PaulHarvey - 15 Jan 2011

Support.Faq40#ReplacingTOPICTITLE has a reasonably non-trivial parameterised Set variable

-- PaulHarvey - 15 Jan 2011

Crawford, looking at the commits, it appears that this feature has been merged to trunk and release 1.1.4 Okay to set Waiting for Release, or does it need more work?

-- GeorgeClark - 02 Oct 2011

I left it waiting for feedback to see if anyone else tried it; Paul has, but TBH I don't understand his feedback. AFAIK it's ready for production, but I'd really like some more feedback.

-- CrawfordCurrie - 08 Oct 2011

Setting WaitingForRelease - so it doesn't get overlooked on release

-- GeorgeClark - 23 Nov 2011
 
Topic revision: r15 - 12 Apr 2012, PaulHarvey
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