Examples/Parameter: format (example 2)
Appearance
< Examples
Example
[edit source]The following is an example of how to use the variable %NR% to set font size. This lists articles in category Fruit examples, with ordermethod set to title and order descending. The format parameter wraps the page name in a span element, using an Extension:ParserFunctions expression #expr to multiply the font size of the current page name (starting from 1) by 0.5em for each subsequent result. The results count is limited to 3.
- Code
{{#dpl:
|category = Fruit examples
|ordermethod = title
|order = descending
|format = ,\n<span style="font-size: ²{#expr:%NR% * 0.5}²em;">'''[[%PAGE%]]'''</span>,\n,
|count = 3
}}
- Result