Jump to content

Arbeiten mit DPL3: Difference between revisions

From TwainFrame
Created page with "= Basics of DynamicPageList3 (23.07.2025)= DynamicPageList3 generates lists of pages, page properties (metadata), and/or template parameter values, for display in other articles. Manual: https://dpl3.wikitide.org/wiki/Main_Page There are different parameters to structure '''which pages''' are included, '''what content''' from these pages is included, and '''how the output is formatted'''. == Inclusion Criteria: Page Selection == DPL3 needs criteria for what to include..."
(No difference)

Revision as of 11:31, 17 July 2025

Basics of DynamicPageList3 (23.07.2025)

DynamicPageList3 generates lists of pages, page properties (metadata), and/or template parameter values, for display in other articles.

Manual: https://dpl3.wikitide.org/wiki/Main_Page

There are different parameters to structure which pages are included, what content from these pages is included, and how the output is formatted.

Inclusion Criteria: Page Selection

DPL3 needs criteria for what to include in the list it generates. Some possible choices are:

  • category OR notcategory
    • (category=Illustration)
  • namespace
    • (namespace=Template)
  • links
    • (linksfrom=Projektseite)
    • (linksto=Arbeiten mit DPL3)
  • use of templates
    • (uses=Template:ImageMetadata)
  • title (Select one single page by its (namespace and) title, requires additional parameters)
    • title=Projektseite |include=#Temporäre Hilfe-Seiten
  • contents

Restricting the output to a certain number of results can be done with "count" (count=2).

Example

The example can be changed to see how the different parameters work in real time (using the Preview all changes can be observed while working on the parser function).

Result of the function call:


Inclusion Criteria: Output Volume

The default list view only includes the page name as a link in a basic list format (unordered list). Other data can be included from each page to:

  • Specify a header/footer to show when results are found or not found
  • Show the number of articles in the result set
  • Add metadata (size, author, last edited by, date of last change, etc.) to the output (not discussed below, refer to the manual)
  • Include contents from articles (text, template variables, etc.)
  • Cut off the articles' content at a certain length


Some possible parameters are:

  • resultsheader / oneresultheader / noresultheader
  • resultsfooter / onersultfooter / noresultfooter
    • (resultsheader = There are %PAGES% entries.)
  • include
    • (include=*)
    • (include=%0[200])
    • (include={ImageMetadata}:work-title:year:%PAGE%)

Example

The example can be changed to see how the different parameters work in real time (using the Preview all changes can be observed while working on the parser function). Some include statements only make sense in combination with specific page selection criteria.

Result of the function call:

There are 4 entries.