PathfinderWiki
Log in

Forum:Hlist template is bad

From PathfinderWiki
Forums: Workshop > Hlist template is bad


From Forum:Inline indexes?:
it seems our documentation for HLIST is wrong, which is partly why I ended up hating it (above). Our documentation says "pass the whole list", but the actual documentation is "pass the list items as parameters, not the list". The fact that it works in the wiki currently (where we're passing a complete list as "the first list item") is luck - the generated output on, say, Portal:Fiction is "an html list with one item, which itself is an html list" which is "wrong".

When I use the WP documentation for hlist (passed piped items instead of passing a whole list), the generated markup is better/acceptable:

http://pathfinderwiki.com/wiki/User:Morbus_Iff/Sandbox/InlineIndex1

  — User:Morbus Iff

Context: The horizontal list is already a CSS class (.hlist in MediaWiki:Common.css) and can be used without a template. The {{hlist}} template was pulled from the last version on WP before they switched theirs to Lua. Documentation was probably partially copied from a different version and partially due to me not interpreting the code correctly.

Updating the hlist template documentation now. I think a properly functioning and well-documented {{hlist}} template could be useful, but if we want to axe the template and replace it with some other workflow, we can.

Updated {{hlist/doc}} and copied {{flatlist}} from Wikipedia, which wraps the contents in a div with the hlist style. Also removed an extraneous line break in {{Appearances}} that was causing it to wrap itself in a new ul or p each time it was transcluded.
{{hlist}} was only used on about 10 pages, most of them portals. These have all been switched to {{flatlist}}. The rest of the hlist use on the wiki should be calling the .hlist CSS class, as in the navboxes and {{Adventure overview}}.