No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
     | order          = descending
     | order          = descending
     | count          = 1
     | count          = 1
     | format          = ,{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}%PAGE%,,
     | format          = ,%PAGE%,,
     | noresultsfooter = {{#dpl:| namespace      = {{NAMESPACE:{{{1}}}}}
     | noresultsfooter = {{#dpl:| namespace      = {{NAMESPACE:{{{1}}}}}
         | titlematch      = {{PAGENAME:{{{1}}}}}/%
         | titlematch      = {{PAGENAME:{{{1}}}}}/%
Line 12: Line 12:
         | order          = ascending
         | order          = ascending
         | count          = 1
         | count          = 1
         | format          = ,{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}%PAGE%,,
         | format          = ,%PAGE%,,
         | noresultsfooter =  
         | noresultsfooter =  
       }}
       }}
Line 25: Line 25:
</pre>
</pre>


* '''PageName''': The base name of the page (e.g., "Kernel Documentation" or "LC:CONFIG_SMP").
* '''PageName''': The base name of the page (e.g., "Kernel Documentation" or "LC:CONFIG_SMP"). Must always be provided.
* '''Version''': The version to match (e.g., "v6.2").
* '''Version''': The version to match (e.g., "v6.2").



Latest revision as of 15:38, 21 August 2025

Documentation

This template finds the best-matching versioned subpage based on a given page name and version string.

Usage

{{FindVersionedSubpage|PageName|Version}}
  • PageName: The base name of the page (e.g., "Kernel Documentation" or "LC:CONFIG_SMP"). Must always be provided.
  • Version: The version to match (e.g., "v6.2").

Logic

The template follows these rules in order:

  1. It returns an exact match if a subpage with the given version exists.
  2. If not, it returns the closest older version.
  3. If there are no older versions, it returns the oldest available version.

This template requires the DPL3 extension.