Jump to content

Examples/Parameter: secseparators (example 2)

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

Example

[edit source]

This list pages in category Fruit examples using listseparators (alias for format) to define a table with three columns and headers. It also specifies the content for the first column as the page name. The includepage parameter specifies a template used on each page, along with the "grows" and "notes" parameter value for each row.

format=Startall,Start,End,Endall where Startall, Start, End and Endall are wiki tags used to separate the list items:
  • Startall before all — e.g., may specify wikitext to begin a table (including headers).
  • Start before each — e.g., may specify wikitext to begin row, its cell and cell content.
  • End after each — e.g., may specify content to end a cell or row.
  • Endall after all — e.g., may specify content to end a table.
Note: |debug = 5 can be added to view any resultant wikitext given, and should always be put at the top of the statement, a value of 0 disables it.


Assuming the chapter on "Notes" contains a long text, it can be truncated (e.g., shortened to 40 characters) by specifying the text for truncation after the number to truncate ([40 more...]. A link direct to those chapters is generated automatically. Be aware that truncating with [ ] can break text formatted with wikitext or tags such as <nowiki>.

Code
{{#dpl:
|category       = Fruit examples
|listseparators = {¦class="wikitable" ¶!Fruit ¶!Grows on ¶!Notes,¶¦-¶¦[[%PAGE%|%TITLE%]],,¶¦}
|includepage    = {Fruit-Infobox}:grows,#Notes[40 more...]
|secseparators  = \n¦
|count          = 5
}}
Result
Fruit Grows on Notes
Apple On trees

There are multiple varieties of more... Apples skins contain more fiber more...

Grape On vines
Orange On trees
Plum
Banana On a tree-like plant
Cookies help us deliver our services. By using our services, you agree to our use of cookies.