Difference between revisions of "Template:Plainlist"
(Using 'style' as a parameter name is interfering with other templates, such as Template:Unbulleted_list, using the CSS 'style=' attribute in it's code. The attribute is getting interpreted as being a parameter for Plainlist.) |
(Move coder comment into /doc subpage) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <!-- <templatestyles src="Plainlist/styles.css"/> --><div class="plainlist {{{ | + | <!-- <templatestyles src="Plainlist/styles.css"/> --><div class="plainlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| |
{{{1}}} | {{{1}}} | ||
</div>}}<noinclude></div> | </div>}}<noinclude></div> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 21:34, 3 October 2024
Contents
This template's code was copied directly from Wikipedia. For more information, including more details on how to use this template in your articles, please see Wikipedia's Template:Plainlist documentation. |
WARNING: This Template is Buggy
I'm not sure whether the problem is occurring with Hgames Wiki's installed version of MediaWiki, but this template is exhibiting very odd behavior. The intended use of the {{plainlist}} template is to nest an unordered list (<ul>
) or an ordered list (<ol>
) inside of it. However, if you apply any CSS style attributes to any of the elements of the list, the entire list is not getting rendered by the MediaWiki engine!
As a result, I have had to forgo calling this template from the {{unbulleted list}} template, and instead hard code the <div class="plainlist">
tag directly into the {{unbulleted list}} template. Of course, it's possible that if we were able to use <templatestyles>
, things would work, because all of the styles on the unordered list in {{unbulleted list}} should have been getting specified in "Plainlist/styles.css"
anyway, and is only directly being used inside a style
attribute on the <ul>
element because <templatestyles>
doesn't work. Also, things might be working better if Lua-based modules could be used on Hgames Wiki, because the entire reason why the {{unbulleted list}} template looks the way that it does is because we can't use a Lua module like Wikipedia does.