Examples/Parameter: hlistattr (example 1): Difference between revisions

Simplify examples to match now that extra styles could be moved to Common.css
imported>FrozenPlum
(Created page with "<noinclude>{{noedit}}</noinclude><!-- This is the example preloaded for testing, press "Show Preview" to see the example working (at the bottom of the page). If you save this page, it saves as a new section at the bottom of your '''User:Username/Sandbox''' --> ==Example== This will select articles in Category:Countries in Europe and orders them by ''category'' (which is used in combination with <code>headingmode</code> to put category as header) and ''pagetouched'...")
 
imported>FrozenPlum
(Simplify examples to match now that extra styles could be moved to Common.css)
 
(13 intermediate revisions by the same user not shown)
Line 6:
==Example==
 
This will selectselects articles in [[:Category:Countries in Africa]] or [[:Category:Countries in Europe]] and orders them by ''category'' (which is used in combination with <code>headingmode</code> to put the category as the header) and ''pagetouched''. <code>{{DPL|mode}}</code> is set asto ''ordered'' which causes the articles that belongare tolisted under the categorycategories to be numbered. The <code>hlistattr</code> adds attributesformatting at the heading/top level, which appliesencloses aall classother toitems; coloran theseID elementsis orangegiven, assignsa the ID "topmenu" and the font size of 17 pixels[https://www.w3schools.com/cssref/sel_class.asp TheCSS '''entireclass] listis wouldgiven appear orange, if''' the <code>listattr</code> wasn'tto set which sets the listcolor itemorange, to blue. The <code>itemattr</code> setsand a classborder and stylepadding toare the contents ''within'' the list item, to italicset.
 
<pre>
{{#dpl:
|category = Countries in Africa¦Countries in Europe
|ordermethod = category,pagetouched
|headingmode = definition
|mode = ordered
|hlistattr = id="dl-example" class="dpl-orange-background" id="topmenu" style= "font-size:17px;"
|count = 12
|listattr = id="listitem" class="dpl-blue-background"
|itemattr = id="submenulistitem" style="font-style: italic;"
|count = 1
}}
</pre>
Line 24 ⟶ 22:
 
{{#dpl:
|category = Countries in Africa¦Countries in Europe
|ordermethod = category,pagetouched
|headingmode = definition
|mode = ordered
|hlistattr = id="dl-example" class="dpl-orange-background" id="topmenu" style= "font-size:17px;"
|count = 12
|listattr = id="listitem" class="dpl-blue-background"
|itemattr = id="submenulistitem" style="font-style: italic;"
|count = 1
}}
<noinclude>
[[Category:ControllingHeading output format (examples)‎mode]]
[[Category:Uses category parameter]]
[[Category:Uses ordermethod parameter]]
Line 40 ⟶ 36:
[[Category:Uses mode parameter]]
[[Category:Uses hlistattr parameter]]
[[Category:Uses listattrcount parameter]]
[[Category:Uses itemattr parameter]]
</noinclude>
Anonymous user