User tips: Difference between revisions
initial draft |
Specify padding-left for consistent visual in this page because Messagebox no longer has background images in the CSS. The template now inserts the images inline with the content. |
||
| (9 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
In general, when providing a "tip" on this site, use the [[:Template:Messagebox]] to decorate your tip in a standardized format. | |||
{{Messagebox | Here's a list of all the "tips" on this wiki. | ||
[[File:Help-hint.svg|120px|link=]]{{Messagebox | |||
| type = warning | | type = warning | ||
| style = width:50%; | | style = width:50%; | ||
| text = | | text = Do not edit this page (unless you are changing the DPL). To have your tip appear on this page, use the [[:Template:Messagebox]] template. Your content will "automagically" appear here as well as in the original article. | ||
}} | |||
{{#dpl: | |||
| uses = Template:Messagebox | |||
| ordermethod = title | |||
| nottitlematch = Messagebox | |||
| include = {Messagebox}:type:text | |||
| table = class="wikitable sortable",, Type, Tip | |||
| tablerow =\n<span class="message-box message-%%" style="padding-left:8px;">%%\n</span>,%% | |||
}} | |||
The list above is generated using functionality of the [[mw:Extension:DynamicPageList3|DynamicPageList3 extension]]. | |||
== DPL Query == | |||
Here is the DPL query that generates the content. DPL3 comes with code for the [https://www.mediawiki.org/wiki/Extension:Labeled_Section_Transclusion Labelled Section Transclusion] extension. So, if you are familiar with the LST extension, you get that "for free" with DPL. | |||
;[https://dpl3.wikitide.org/wiki/Criteria_for_page_selection#uses uses]: is pretty straightforward. | |||
;[https://dpl3.wikitide.org/wiki/Controlling_output_volume#include include]: Include pages, certain sections of articles, or even template parameters. We include the Messagebox template calls and the 'type' and 'text' parameters of that template into the output. It is important to understand how <code>table</code> and <code>tablerow</code> work if you want to output tabular data with <code>include</code>. In this dpl query, we use <code>table</code> to specify the table headers "Type" and "Tip" to label the content that comes from the 'type' and 'text' parameters selected by <code>include</code>. The <code>tablerow</code> specification allows us to precisely format the data represented by the '%%' token. | |||
<pre> | |||
{{#dpl: | |||
| uses = Template:Messagebox | |||
| ordermethod = title | |||
| nottitlematch = Messagebox | |||
| include = {Messagebox}:type:text | |||
| table = class="wikitable sortable",, Type, Tip | |||
| tablerow =\n<span class="message-box message-%%" style="padding-left:8px;">%%\n</span>,%% | |||
}} | }} | ||
</pre> | |||
== See Also == | |||
[[Admin tips]] | |||
{{References}} | |||
[[Category:Wiki]] | |||