Wikibooks:Reading room/Technical Assistance

From Wikibooks, open books for an open world
Jump to: navigation, search
Replacement filing cabinet.svgArchivesWikibooks Discussion Rooms
Discussions Assistance Requests
General | Proposals | Projects | Featured books General | Technical | Administrative Deletion | Undeletion | Import | Permissions

Welcome to the Technical Assistance reading room. Get assistance on questions related to MediaWiki markup, CSS, JavaScript, and such as they relate to Wikibooks. This is not a general-purpose technical support room.

To submit a bug notice or feature request for the MediaWiki software, visit Phabricator.

To get more information about the MediaWiki software, or to download your own copy, visit MediaWiki

There are also two IRC channels for technical help: #mediawiki for issues about the software, and #wikimedia-tech for WMF server or configuration issues.

Making or modifying a simple navigation template[edit]

I like the Simple chapter navigation template. How can I modify it, or make one like it, where the CSS border is at the bottom of the div rather than at the top. I'd like to use this navigation template at the top of some pages and thus need the border underneath the navigation rather than on top. Larsnooden (discusscontribs) 12:50, 19 June 2016 (UTC)

Have you checked Module:Chapter navigation? JackPotte (discusscontribs) 07:04, 22 September 2016 C)
Yes. Thanks. I've seen that and it refers to { {simple chapter navigation} } for regular use. Though I see the parts I want to change. Swap out "-top-" for "-bottom-" and it would work.
['border-top-style'] = 'solid';
['border-top-width'] = 'thin';
Is there a way for regular users to make a new template that uses a modified version and not use the simple chapter navigation template? Larsnooden (discusscontribs) 09:50, 22 September 2016 (UTC)
If by regular users you're implying those who can't use the Lua, it will simply need to add a few parameters into {{simple chapter navigation}} (and Module:Chapter navigation) to customize the borders. I should be able to do that in a few hours... JackPotte (discusscontribs) 12:13, 22 September 2016 (UTC)
Yes check.svg Done The template can now provide what you've asked for (please have a look to its new documentation). JackPotte (discusscontribs) 22:08, 22 September 2016 (UTC)
Thanks! The documentation looks exactly like what I was aiming for (shows an option for bottom borders). In deployment it still puts the borders at the top, though. See this sandbox. There in the sandbox, the line should be below the link for "Tunnels", or have I entered it wrong? Larsnooden (discusscontribs) 08:05, 23 September 2016 (UTC)
Actually the only "div" is a few pixels high and stops before "Tunnels". To move the border below, we should add it to the "span" tag (or to a new "div" below, or more likely extend the first "div" height). I may have the time to study that tonight. JackPotte (discusscontribs) 08:32, 23 September 2016 (UTC)
@Larsnooden: it's OK now. JackPotte (discusscontribs) 14:50, 24 September 2016 (UTC)
That's it. Thanks a lot. Squeezing a margin-bottom:1em; in there might make it balanced, but it's good and now I can update the chapters. Larsnooden (discusscontribs) 15:01, 24 September 2016 (UTC)