r6 - 31 Dec 2004 - 09:39:49 - WilliamHuangYou are here: TWiki >  Codev Web > UrlParamWithDefaultValue
Tags:
, create new tag
A small enhancement for %URLPARAM{}%:

It supports now a default="..." argument, e.g. %URLPARAM{ "description" default="(not specified)" }%

This is useful if you need a default value in case the URL parameter is empty or missing. See also recently added UrlParamWithNewlineArg.

Enhancement is in TWikiAlphaRelease (for CairoRelease) and TWiki.org. Docs in TWikiVariables are updated.

Feedback and ideas for enhancements is appreciated.

-- PeterThoeny - 29 Aug 2003

Minor Changes?

What if I have use of the empty string "" (e.g. searching for forms with some field undefined) but also want to provide fallback when the parameter is missing? Can you add a missing attribute to carry the alternative string for a parameter that is missing. This attribute should override the default attribute.

-- WilliamHuang - 31 Dec 2004

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r6 < r5 < r4 < r3 < r2 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo