Feature Proposal: Include Parameters With Default

Motivation

The ParameterizedIncludes is a powerful feature to build a library of components. Dynamic behavior can be done by supplying parameters to INCLUDEs. There is currently no easy way to take action on optional parameters. The new ParameterizedVariables feature supports defaults, so does VarURLPARAM. This proposals adds a defaults to parameters passed to INCLUDEs.

Description and Documentation

When you do this: %INCLUDE{ "Library" section="alertbox" title="Hello" message="This is a test." }%

You typically have a %title% and %message% in the alertbox section to show the title and message, respectively. This proposal adds optional defaults to these variables, such as %title{ default="Alert!" }% and %message{ default="Please specify a message parameter" }%

Impact

Implementation

-- Contributors: PeterThoeny - 2011年04月05日

Discussion

This proposal is now accepted by the 7 days review period.

-- PeterThoeny - 2011年04月13日

This is now implemented and documented in SVN trunk. See VarINCLUDE, IncludeTopicsAndWebPages.

-- PeterThoeny - 2011年04月14日

Edit | Attach | (削除) Watch (削除ここまで) | Print version | History : r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2011年04月14日 - PeterThoeny
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

AltStyle によって変換されたページ (->オリジナル) /