Examples/Parameter: include (example 2): Difference between revisions
< Examples
imported>FrozenPlum m (Cross link the examples that show different outcomes for different output formatting of nearly the same statement (the behaviour is different enough that it warrants explaining).) |
imported>FrozenPlum m (FrozenPlum moved page Controlling output volume/Parameter: include (example 2) to Examples/Parameter: include (example 2): Simplifying how things are structured) |
||
(One intermediate revision by the same user not shown) | |||
Line 25: | Line 25: | ||
}} |
}} |
||
<noinclude> |
<noinclude> |
||
[[Category: |
[[Category:Include contents from the articles in the result set]] |
||
[[Category:Uses titlematch parameter]] |
[[Category:Uses titlematch parameter]] |
||
[[Category:Uses include parameter]] |
[[Category:Uses include parameter]] |
Latest revision as of 01:14, 1 April 2023
Example
This matches (and selects) an article named "Grape" and includes the content of the page section (indicated by #
) named "about" or "About" (include
is not case-sensitive). The table styles are provided in the first table
argument, followed by the remaining table headers. When using table
format, if there is more than one section with the same name used on the result page, each section will be listed in a separate table row. If the table
statement is removed, the page title will only appear once, followed by each section's contents listed one after the other, as can be seen in this example.
{{#dpl: |titlematch = Grape |include = #about |table = class="wikitable sortable", Page, Section content }}
Result
{{#dpl: |titlematch = Grape |include = #about |table = class="wikitable sortable", Page, Section content }}