Template talk:BookNaviBar

Latest comment: 2 years ago by A1Cafel in topic Edit request 2021-11-07

Please change the code of this template to support RTL and on the way remove the last div, which isn't usefull when setting clear:both in the first div. The new code:

<div style="font-size:150%; font-weight:bolder;direction:{{Dir|{{int:Lang}}}};clear:both;">
{{#if:{{{3|}}}|<span style="float:{{#switch:{{int:Lang}}|he|ar|kk|ks|yi|fa|ur|mzn=right|#default=left}};">[[:File:{{{1}}}{{{3}}}.{{{2}}}|<<< {{int:Allpagesprev}}]]</span>}}
{{#if:{{{4|}}}|<span style="float:{{#switch:{{int:Lang}}|he|ar|kk|ks|yi|fa|ur|mzn=left|#default=right}};">[[:File:{{{1}}}{{{4}}}.{{{2}}}|{{int:Allpagesnext}} >>>]]</span>}}
</div>

ערן (talk) 12:22, 11 April 2009 (UTC)Reply

Done, but with some different code that checks for {{Dir}} instead of hardcoding the list of languages. Please check my edit. It looks okay with both rtl and ltr, but direction has many pecularities that I could have missed. --Slomox (talk) 11:47, 14 April 2009 (UTC)Reply

Additional navigation edit

I suggest not only to link on the previous an d next page, but also to jumpt 10 pages ahead / back and on the first and the last page. In the middle of the so enhanced navi-bar:

<previous  <<10 pages back  <<<first page          last page>>>  10 pages ahead>>  next>

should be placed an inputbox to jump directly to a specific page (could be useful i.e. while reading the table of contents).

As this template is mostly used within other templates, another benefit could be achived by letting the "hosting" book-template tell this one, how many pages exist in the scanned book. So the one, who's uploading the pages, only has to tell the "hosting" template, which actual page number the template refers to (and not as now the prev and the next page).

BTW: If there are less than 10 pages remaining for prev/next, so should the template detect that fact and link to the last page.

--Carbenium (talk) 15:54, 23 August 2010 (UTC)Reply

Generalization edit

If converted in Lua, the template could list the whole series of alternatives, the script testing which one matches with current page so getting the previous and the following one. This will allow to copy the same template code into all items: good for automation. I see no limitation for position of costant and variable segment of for numeric/string content of variable segment. Perhaps a better solution could be to use different separators for main blocks (prefix, block of alternatives, postfix) and alternatives into the second block; using / character to split the latter, #titleparts could be used to find the match when the number of alternatives is reasonably short.

I'll try in existing sequence File:Le opere di Galileo Galilei_|I|II|III|III.2|IV|V|.....|XX|djvu. --Alex_brollo Talk|Contrib 13:48, 12 November 2013 (UTC)Reply

Edit request 2021-11-07 edit

{{Edit request}} Remove the {{Heavily used template}} at the top as it has been moved to documentation page. --A1Cafel (talk) 08:41, 7 November 2021 (UTC)Reply

@A1Cafel Is putting it on the documentation page the usual practice? Template:Heavily used template/doc#Usage suggests it’s meant to go in the template itself (permalink). Lucas Werkmeister (talk) 17:11, 7 November 2021 (UTC)Reply
@Lucas Werkmeister: Because I see template like {{0}} or {{AD}} put the {{Heavily used template}} at the doc page, and I think this should be better. If you think this is not good, I can stop this EP and open a discussion at COM:VPP--A1Cafel (talk) 02:24, 8 November 2021 (UTC)Reply
@A1Cafel: Alright, I opened a section at Commons:Village pump/Proposals#Should Heavily used template go on the template page or the /doc page? (permalink) Lucas Werkmeister (talk) 20:42, 10 November 2021 (UTC)Reply
  Not done, Jeff G. says it should go on the template itself and I see no reason to disbelieve him. --Lucas Werkmeister (talk) 23:33, 12 November 2021 (UTC)Reply
@A1Cafel: Why did you want to move {{Heavily used template}} in the first place? {{BookNaviBar}} is transcluded 594,272 times, so 594,272 files would have to be touched by a jobrunner.
 
Please, think of the server kitties.
  — Jeff G. please ping or talk to me 05:59, 13 November 2021 (UTC)Reply
@Jeff G.: Because in general wikipedia site, templates like this are at documentation page, it can keep the mainpage tidy. --A1Cafel (talk) 06:20, 13 November 2021 (UTC)Reply
Return to "BookNaviBar" page.