Utilisateur:Deeploz/Template:UpToDate/doc Voir l’historique

Révision datée du 22 février 2017 à 10:37 par Deeploz (discussion | contributions) (Page créée avec « {{doc subpage}} this template checks the validity of a page that is based on (or translated from) content hosted in other pages. To check the validity, the template retr... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
This is a documentation subpage for Utilisateur:Deeploz/Template:UpToDate.
It contains usage information, categories and other content that is not part of the original utilisateur template page.

this template checks the validity of a page that is based on (or translated from) content hosted in other pages.

To check the validity, the template retrieves the version number of each source page and compares it with an expected version number.

The template allow to declare up to 3 source pages with their expected version number.

If one of the source page is significantly updated, resulting in a version change, the template will detect the difference with the new version of the source page and the old expected version and display a warning banner and a red traffic light in the page title line. Otherwise, if validated, a green traffic light is displayed in the page title line

Syntax

{{ UpToDate
|source page #1| expected version for source page #1
|source page #2| expected version for source page #2
|source page #3| expected version for source page #3
}}

The second and third line above are optional, according to the number of source pages that are used to build the content of the current page.

Example

If a page has been built by aggregating content from 3 different pages, Alpha, Beta and Gamma, respectively in version 1.3, 2.2 and 1.0, the following template should be added at the top of the body.

{{ UpToDate
|Alpha| 1.3
|Beta| 2.2
|Gamma| 1.0
}}


Future improvement

  • The current template currently works at a page level for the source page and does not identify change at the section level only.
    • If a change occurs only in a section of the source page, the version increase will impact the whole page and trigger all templates pointing to this source page, even if the destination page is not using the modified section.
    • The template (and the whole mechanism) should be improved to include a section per section validity check.
  • The current template has no recursive capabilities.
    • if the source page is transcluding a content from another page, a change on this other page won't trigger a version increase on the source page, thus won't trigger the template.
    • This will require further investigation to find a efficient way to propagate a change through transclusion.