Actions

Template

Evaldemo/doc

From Joomla! Documentation

< Template:Evaldemo
Revision as of 12:47, 11 May 2008 by CirTap (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This is a documentation subpage for Template:Evaldemo.
It contains usage information, categories and other content that is not part of the original template page.
To view the template page itself, see Template:Evaldemo.

Examples

  1. {{evaldemo|CURRENTDAY|s=is}} displays
    {{ CURRENTDAY}} is 17
  2. {{evaldemo|#expr:2*3}} displays
    {{ #expr:2*3}} gives 6
  3. {{subst:evaldemo|subst=subst:|#expr:2*3}} gives:
    {{ subst:#expr:2*3}} gives 6
  4. {{evaldemo|1=#expr:2+2=5}} displays
    {{ #expr:2+2=5}} gives 0
  5. {{evaldemo|1=#expr:(2+2=4)|s==}} displays
    {{ #expr:(2+2=4)}} = 1
  6. {{evaldemo|urlencode:!|s==}} displays
    {{ urlencode:!}} = %21
  7. {{evaldemo|uc:abc}} gives
    {{ uc:abc}} gives ABC
  8. {{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):

  1. {{evdn|#expr:4*|#expr:not 0| >3 | s=yields}} displays
    {{ #expr: 4*{{ #expr:not 0}} >3 }} yields 1
  2. {{evdn|urlencode:|DIRMARK}} displays
    {{ urlencode:{{ DIRMARK}}}} gives %E2%80%8E

See also