Examples/Parameter: format (example 2): Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
(Created page with "<noinclude>{{note|Please '''do not edit''' this page unless you're wanting to edit the manual itself, it is an example included in the manual.|error}}</noinclude><!-- This is the example preloaded for testing, press "Show Preview" to see the example working (at the bottom of the page). If you save this page, it saves as a new section at the bottom of your '''User:Username/Sandbox''' --> ==Example== Below is an example of how to use the {{DPL|variables|variable}} {{code...")
 
imported>FrozenPlum
m (Refine the statement explaining the example)
Line 6: Line 6:
==Example==
==Example==


Below is an example of how to use the {{DPL|variables|variable}} {{code|%NR%}} to set the font size. This will list articles in [[:Category:Fruit examples]], (in descending order (by title), limited to a count of four, and each result on a new line with font size set to the current article sequence number (starting from 1). The result is that the font size gets larger with each item listed.
The following is an example of how to use the {{DPL|variables|variable}} {{code|%NR%}} to set the font size. This will list articles in [[:Category:Fruit examples]], by title (in descending order), limited to a count of four. Each result will be formatted to appear on a new line and the font size will be set to the current article sequence number (starting from 1).


<pre>
<pre>

Revision as of 02:47, 10 April 2022

Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

Example

The following is an example of how to use the variable %NR% to set the font size. This will list articles in Category:Fruit examples, by title (in descending order), limited to a count of four. Each result will be formatted to appear on a new line and the font size will be set to the current article sequence number (starting from 1).

<dpl>
  category	 = Fruit examples
  ordermethod	 = title
  order		 = descending
  count		 = 4
  format	 = ,\n<font size="%NR%">'''[[%PAGE%]]'''</font>,<br/>,
</dpl>

Result

<dpl>

 category	 = Fruit examples
 count		 = 4
 ordermethod	 = title
 order		 = descending
 format	 = ,\n%PAGE%,
,

</dpl>