Template:Xviews/nth view/doc
| icon | This is a documentation subpage for Template:Xviews/nth view. It may contain usage information, categories and other content that is not part of the original template page. |
Return the nth view item (date:value) from a pageviews file containing data downloaded from the pageviews tool.
Usage
[edit source]{{Xviews/nth view|Talk:ArticleName/pageviews|number}}
Parameters
[edit source]|1=– name of a Talk subpage containing page views data dumped from the tool|2=– which item is requested: legal values: 1 to max number of data items in the file
Examples
[edit source]{{Xviews/nth view|Talk:Liberation of France/pageviews|3}}→ void:outrange{{Xviews/nth view|Talk:World War II/pageviews|5}}→ void:outrange{{Xviews/nth view|Talk:House of the Dragon/pageviews|2}}→ void:outrange{{Xviews/nth view|Talk:Cleopatra/pageviews|7}}→ void:outrange
Notes
[edit source]In a page views download data file, each page-view item is a data pair on a line by itself, consisting of one date and one statistic separated by one blank (e.g., 2024-06-01 533 ). For easier handling in template-land, the data file page view data (i.e., the whole file less the column headers) are slurped into one long comma-separated string (without newlines) permitting easy access of one item by template {{Array}}. Each data item returned by this template has a colon supplied, where there was a blank before; this is again a bow to template issues, where blanks can sometimes be problematic. So, retrieving the 10th array item will return the 10th page view item (in line 11 of the file) and return a page view item like this: 2024-06-01:533 for downline processing.
See also
[edit source]- {{Xviews/vbar}}
- {{Xviews/view count}}
- {{Xviews/max views}}