Actions

Template

Evaldemo

From Joomla! ドキュメンテーション

{{ {{{1}}}}} gives {{{{{1}}}}}

[view] [edit] [history]

Template documentation

Contents

Examples

{{evaldemo|CURRENTDAY|s=is}}

displays
  1. {{ CURRENTDAY}} is 19

{{evaldemo|#expr:2*3}}

displays
  1. {{ #expr:2*3}} gives 6
  2. {{subst:evaldemo|subst=subst:|#expr:2*3}} gives:
    {{ subst:#expr:2*3}} gives 6

{{evaldemo|1=#expr:2+2=5}}

displays
  1. {{ #expr:2+2=5}} gives 0

{{evaldemo|1=#expr:(2+2=4)|s==}}

displays
  1. {{ #expr:(2+2=4)}} = 1

{{evaldemo|urlencode:!|s==}}

displays
  1. {{ urlencode:!}} = %21

{{evaldemo|uc:abc}}

gives
  1. {{ uc:abc}} gives ABC
  2. {{subst:evaldemo|uc:Upper Case|subst=subst:}} substitutes
    {{ subst:uc:Upper Case}} gives UPPER CASE
    See Help:Substitution for several caveats wrt subst=subst:.

As always the expression (first parameter) cannot directly contain "|", "=", plus other special cases related to square brackets / curly braces. In the case of this template "not directly" means "never" except from "=" as shown above.

For simple nested expressions use

Template:Evdn (edit|talk|history|links|watch|logs)

{{evdn|#expr:4*|#expr:not 0| >3 | s=yields}}

displays
  1. {{ #expr: 4*{{ #expr:not 0}} >3 }} yields 1

{{evdn|urlencode:|DIRMARK}}

displays
  1. {{ urlencode:{{ DIRMARK}}}} gives %E2%80%8E

See also