Help talk:DPL Examples/Test table
Creating a table with list-separators
Can I (how can I) use %TITLE%, %COUNT%, etc. with table? --Dmb 01:16, 17 September 2007 (CEST)
- Inside the phantom template you can use these variables. But you can also use them directly in the DPL statement. Gero 12:27, 17 September 2007 (CEST).
- You can even write something like:
{{#dpl: |ordermethod=lastedit |namespace=Help |order=descending |addeditdate=true |addcategories=true |adduser=true |addpagesize=true |mode=userformat |titlematch=% |lastrevisionbefore=3000 |listseparators=¶{¦class="sortable" ¶!article ¶!categories ¶!date ¶!author ¶!size,¶¦-¶¦[http://{{SERVERNAME}}/dpldemo/index.php?title=%NAMESPACE%:²{#urlencode:%TITLE%}²&action=history %TITLE%]¶¦<small>%CATNAMES%</small>¶¦%DATE%¶¦%USER%¶¦%SIZE%,¶,¶¦} |secseparators=\n¦ |count=20 }}
- This will give you the latest modifications in the main namespace and in Talk in a nice format. The link will open the diff in a new window.
article | categories | date | author | size |
---|---|---|---|---|
a navigational template}}&action=history Making a navigational template | Help, Pages using DynamicPageList3 dplreplace parser function, Pages using DynamicPageList3 dplvar parser function, Pages using DynamicPageList3 parser function | 2024-03-27 21:23:43 | Rye Greenwood | 3720 |
Contents | Help, Pages using DynamicPageList3 dplvar parser function | 2024-03-05 12:56:25 | NewtheElf | 3736 |
Rollback | Help, Pages using DynamicPageList3 dplvar parser function | 2024-03-02 04:40:58 | Rye Greenwood | 2086 |
animated GIFs}}&action=history Creating animated GIFs | Help, Pages using DynamicPageList3 dplvar parser function, Third party software | 2024-02-19 17:26:31 | Overlordrunt777777 | 8787 |
& l10n for templates}}&action=history I18n & l10n for templates | Help, Pages using DynamicPageList3 dplreplace parser function, Pages using DynamicPageList3 dplvar parser function, Pages using DynamicPageList3 parser function | 2024-02-11 00:16:39 | Rye Greenwood | 6480 |
rights}}&action=history Group rights | Pages using DynamicPageList3 dplvar parser function, User groups | 2023-11-24 18:01:51 | BotAntony | 3555 |
code text}}&action=history Displaying code text | Help, Pages using DynamicPageList3 dplreplace parser function, Pages using DynamicPageList3 dplvar parser function, Pages using DynamicPageList3 parser function | 2023-06-12 23:17:14 | Rye Greenwood | 7128 |
Cache | Help, Pages using DynamicPageList3 dplreplace parser function, Pages using DynamicPageList3 dplvar parser function, Pages using DynamicPageList3 parser function | 2023-05-08 00:33:30 | Rye Greenwood | 3747 |
Signatures | Help, Pages using DynamicPageList3 dplvar parser function | 2022-08-27 23:31:31 | Rye Greenwood | 5198 |
a new page}}&action=history Starting a new page | Help, Pages using DynamicPageList3 dplvar parser function | 2022-08-27 23:29:16 | Rye Greenwood | 4392 |
Editing | Help, Pages using DynamicPageList3 dplvar parser function | 2022-04-07 06:18:20 | Eraloiz | 3959 |
Manual}}&action=history DPL Manual | 2022-03-10 07:09:06 | ReedemtheD3ad! | 2507 | |
Manual/Controlling output format}}&action=history DPL Manual/Controlling output format | 2021-06-29 19:43:45 | Rye Greenwood | 63134 | |
Contents/es | 2021-01-10 12:55:18 | Hypersuperlol | 4513 | |
Manual/Controlling output volume}}&action=history DPL Manual/Controlling output volume | 2020-08-16 00:16:53 | Philo04 | 29127 | |
Manual/Criteria for page selection}}&action=history DPL Manual/Criteria for page selection | 2019-04-24 13:36:08 | Rye Greenwood | 45939 | |
Manual/General Usage and Invocation Syntax}}&action=history DPL Manual/General Usage and Invocation Syntax | 2019-04-21 12:23:01 | Rye Greenwood | 17100 | |
Examples/Test resultsheader}}&action=history DPL Examples/Test resultsheader | 2019-01-04 11:53:10 | Rye Greenwood | 2869 | |
Manual/Source and Installation}}&action=history DPL Manual/Source and Installation | 2018-11-18 02:09:56 | Ferretwings | 12406 | |
Manual/dplreplace}}&action=history DPL Manual/dplreplace | 2018-11-14 03:15:46 | ReedemBot | 705 |
- The URL part for the listseparators might be re-written as [http://{{SERVERNAME}}/dpldemo/index.php?title=²{urlencode:%PAGE%}²&diff %PAGE%] --nakohdo 17:19, 17 June 2011 (CEST)
Table with a column for each article?
How can I create a table with a column for each article? I have tested with Table#columns, but it did not work for me. Thank you --Pdcemulator 08:44, 12 July 2010 (UTC)
Name | Some Article 1 | Some Article 2 | Some Article 3 |
Value 1 | some value 1-1-1 | some value 2-1-1 | some value 3-1-1 |
Value 3 | some value 1-3-1 | some value 2-3-1 | some value 3-3-1 |
- I am afraid there is no way to do this with DPL. DPL walks through the articles and tables are built line-wise, nbot column-wise. Maybe you can find a MW extension which flips a table as a whole? In that case you could wrap the DPL call by that extension. Gero 20:56, 13 July 2010 (UTC)
- If you have the VariablesExtension installed, you can make a query and store the results in
variablename%NR%
for each matching page. Afterwards use these variables in a standard wikitable:
- If you have the VariablesExtension installed, you can make a query and store the results in
article | a navigational template}}&action=history Making a navigational template | Contents | Rollback |
categories | Help, Pages using DynamicPageList3 dplreplace parser function, Pages using DynamicPageList3 dplvar parser function, Pages using DynamicPageList3 parser function | Help, Pages using DynamicPageList3 dplvar parser function | Help, Pages using DynamicPageList3 dplvar parser function |
date | 2024-03-27 21:23:43 | 2024-03-05 12:56:25 | 2024-03-02 04:40:58 |
author | Rye Greenwood | NewtheElf | Rye Greenwood |
size | 3720 | 3736 | 2086 |
- note: in this example, variablenames are hard-coded; you can also do something like a loop --WiMu 14:58, 14 July 2010 (UTC)
Using parameters
I would like do something like this:
|namespace=Glossary |include= {Some Template}:parm1:parm2:[[parm3|parm4]]
I have created a namespace for a Glossary and would like to use one parameter as an internal link to some article elsewhere in the Wiki.
The whole thing works for the first two parms, but of course not for the internal links. How could that be done? Im thinking of something like "replace parm4 by [[parm3|parm4]]" but do not know how and at which place to get the parm into a regular expression ...
--Bescheid 15:57, 20 July 2010 (UTC)
- You should use a phantom template. See the manual and various examples available here. Within that template you can do whatever you want with the parameters. See the example below:
.Gero 05:30, 21 July 2010 (UTC)