Template talk:Infobox book
This template was nominated for deletion or considered for merging. Please review the prior discussions if you are considering re-nomination:
|
| Template:Infobox book is indefinitely protected from editing as it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
| This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||
| ||||||||||||||||||||||
Website logic
editCan someone smarter than me (I'm looking at you Jonesey95) look at the nested logic on line 145 for data38, the website params. Something just doesn't look right but I can't quite figure out how that should be working... Zackmann (Talk to me/What I been doing) 00:19, 8 January 2026 (UTC)
- OK, here's the code:
| label38 = Website | data38 = {{{website|{{{homepage|{{{URL|{{#ifeq:{{if empty|{{{website|}}}|{{{homepage|}}}|{{{URL|}}}}} | FETCH_WIKIDATA | {{#if:{{#property:P856}}|{{Url|1={{#invoke:Wikidata|getValue|P856|FETCH_WIKIDATA}} }} }} |}}}}}}}}}}}
- My reading of it in natural language is something like:
- Check the value of
|website=and use its value if it is present (even if empty); if|website=is not present, check|homepage=in the same way and then proceed to|URL=. - If none of those parameters are present, then check one by one to see if those three parameters contain the text "FETCH_WIKIDATA".
- For the first one of those three parameters that is found and not empty, if it contains the text "FETCH_WIKIDATA", check to see if the Wikidata property P856 exists for this article, and retrieve and display the URL from Wikidata. If none of the parameters are present and have a value, display nothing.
- Check the value of
- I don't think this code will ever make a Wikidata request, because the only way you get to the #ifeq is if none of the three parameters are present. If none of them are present, there is no way that one of them can be present and contain the value "FETCH_WIKIDATA". See this test case for what happens if
|URL=FETCH_WIKIDATA(the Website label displays "FETCH_WIKIDATA"). – Jonesey95 (talk) 16:34, 8 January 2026 (UTC)- Thank you Jonesey! That really helps. Appreciate you taking the time to explain. I am going to denest these parameters and remove the non-functioning wikidata call. Zackmann (Talk to me/What I been doing) 23:21, 8 January 2026 (UTC)
- That sounds good to me. If someone wants to try to add Wikidata URL retrieval, they can do so in the sandbox and make a proposal here. – Jonesey95 (talk) 23:29, 8 January 2026 (UTC)
- Thank you Jonesey! That really helps. Appreciate you taking the time to explain. I am going to denest these parameters and remove the non-functioning wikidata call. Zackmann (Talk to me/What I been doing) 23:21, 8 January 2026 (UTC)
Set in vs. set on
editFor books like A Rover's Story, which is set on Earth and Mars, it would be good to be able to change the label for |set_in= to "Set on".
This would also be useful, for example, for books set on a ship.
A separate |set_on= parameter would also suffice. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:14, 11 April 2026 (UTC)
- Sandbox edited, test case here. Click [edit] on the test case section to see the "conflicting set_in and set_on parameters" error that appears if both are used.
|set_on=overrides|set_in=and changes the bold label from "Set in" to "Set on". – Jonesey95 (talk) 14:44, 14 April 2026 (UTC)- Looks good; thank you. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:47, 14 April 2026 (UTC)
- I've never liked this parameter. The infobox seems like wrong place to try to convey deeper, more nuanced aspects of the plot like time and geographic location. Neither {{Infobox film}}, {{Infobox television}}, nor {{Infobox video game}} host this information. Was there ever any wider consensus for its adoption? I don't believe so. All I can find is a sitebanned user adding it in 2014 after a discussion to merge {{Torchwood book}} into this template. Οἶδα (talk) 03:38, 15 April 2026 (UTC)
- I have updated the template. Feel free to start a new discussion about deprecating this parameter entirely. – Jonesey95 (talk) 13:49, 15 April 2026 (UTC)
Adaption to other media formats
editI was surprised (but not shocked) to see there is no option to capture adaptions to other media formats (some percentage of books get adapted for the screen, live performance, etc). I believe adaptions do refer back to their inspiration so wanted to document if this link was intentionally missing or not (would be a one to many relationship no doubt).
Has this been discussed before? Is the correct action to capture this data in wikidata instead?
DONAL HUNT (talk) 08:12, 1 May 2026 (UTC)
- Not the kind of information that should be included in an infobox. PARAKANYAA (talk) 08:19, 1 May 2026 (UTC)
- Thanks for the clarification. 🙏 DONAL HUNT (talk) 13:52, 3 May 2026 (UTC)
Edit request to complete TfD nomination
editThis edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Template:Infobox book has been listed at Templates for discussion (nomination), but it was protected, so it could not be tagged. Please add:
{{subst:tfm|help=off|type=sidebar|1=Infobox novella}}
to the top of the page to complete the nomination. Thank you. Οἶδα (talk) 12:45, 15 May 2026 (UTC)
Done. I used noinclude because this template is the target of the proposed merge, so no need to distract readers — Martin (MSGJ · talk) 13:28, 15 May 2026 (UTC)
- Sounds right. Thank you, Martin! Οἶδα (talk) 17:27, 15 May 2026 (UTC)
Merge of {{Infobox novella}}
editAt this TFD it was decided to merge {{Infobox novella}} to this Infobox. The issue is that there are 2 parameters (|published_in= & |publication_type=) that are missing from {{Infobox book}}. I have real reservations about adding 2 additional parameters to this Infobox with over 62,000 uses just to accommodate the 80 pages using these parameters on {{Infobox novella}}. Does anyone have any thoughts on this?
Courtesy pings: Οἶδα, JHunterJ -- Zackmann (Talk to me/What I been doing) 04:43, 14 June 2026 (UTC)
- I think it would be useful to add published_in= as this can also work for the hundreds, maybe thousands, of other books and novellas not using the novella template that were first published in a periodical. That is first publication data, reasonably defining and matches with the rest of the infobox replacement, with no clear overlap with other parameters. I'm not really sure what type does or is for, so maybe not that one. PARAKANYAA (talk) 04:49, 14 June 2026 (UTC)
- Actually, it is apparently for the type of first publication (e.g. anthology or magazine), which is at least largely redundant to media_type (which is already for publication type e.g. hardcover/softcover/etc). So just replace that with that. PARAKANYAA (talk) 04:58, 14 June 2026 (UTC)
- Perfect! Thanks PARAKANYAA. Any thoughts on where in the Infobox
|published_in=should land? Happy to add it, but this is not an Infobox I've worked on before and want to make sure it makes sense... Zackmann (Talk to me/What I been doing) 05:18, 14 June 2026 (UTC)- I don't have strong feelings on that, but maybe above publisher? Or below publisher. I feel like it should be close to that. PARAKANYAA (talk) 05:21, 14 June 2026 (UTC)
- Perfect! Thanks PARAKANYAA. Any thoughts on where in the Infobox
- Was just about to post the same thing. I don't think
|publication_type=is really necessary. {{Infobox short story}} uses it, but I think it works better there where there is a "Short story by [Author]" atop the template and where that|publication_type=parameter is under a divided 'Publication' heading and placed directly under "Published in", because it more obvious that "Publication type" is referring to the type of publication it was published in. You could always put the type in parantheses but even then I don't see the value. That kind of information is best covered in the article itself and not in the infobox. Similar to how film infoboxes have the release date followed by place, e.g. Cannes, without having to convey that Cannes is a film festival. - So that leaves
|published_in=, which I would think is valuable to convey in an infobox for essentially a book published in another work, oftentimes another book. I suppose you could put this in the|publisher=parameter. Several articles already do this when conveying the periodical that a book was serialised in (e.g. The Count of Monte Cristo, The Woman in White (novel)). Though others also use the vague|published=parameter (The Picture of Dorian Gray). Οἶδα (talk) 05:25, 14 June 2026 (UTC)- I feel like using publisher= for it is bad, not what the word publisher means; published is afaik for combining year and company in 1 parameter. Otherwise, I agree. PARAKANYAA (talk) 05:29, 14 June 2026 (UTC)
- How does this testcase look? Mocked up in the sandbox, along with some improved word wrapping... About to call it a night but let me know if this looks good and I can push it tmrw. Zackmann (Talk to me/What I been doing) 05:43, 14 June 2026 (UTC)
- Looks good. Personally, I would put it above
|publisher=instead of right between two of the most important parameters (|publisher=and|pub_date=). I think it follows better under|published=, which is another param for which there are far less cases of its use. Either way, take care Zackmann! I have to head off soon as well. Οἶδα (talk) 06:03, 14 June 2026 (UTC) - Lgtm. PARAKANYAA (talk) 15:30, 14 June 2026 (UTC)
- Looks good. Personally, I would put it above
- Yes that appears to be correct, at least per the documentation and the historical uses I could find in articles. Though I'm unsure what use
|published=has anymore. But that's for another discussion. Οἶδα (talk) 05:47, 14 June 2026 (UTC)- I sometimes prefer published= when there are multiple notable publications for some reason (e.g. a novel first published in another language, then translated; we technically have another way of doing it but it's really ugly). But it's optional. PARAKANYAA (talk) 15:31, 14 June 2026 (UTC)
- I did it the ugly way when I first started, but I stopped when I realized that the infobox prefers first editions, per template documentation. The issue is the same with {{Infobox film}}. These infoboxes are too small to reproduce information and content representing every release or edition of a given work. For that reason, the first edition is preferred. The infobox can also only display one image, so the only neutral choice is the first published edition. And just like {{Infobox film}}, if other editions are found to be notable, it is more appropriate to include them in the main body of the article. But for the sake of neutrality, I have routinely found that keeping infoboxes to the first edition is the most balanced approach. Οἶδα (talk) 17:45, 14 June 2026 (UTC)
- I sometimes prefer published= when there are multiple notable publications for some reason (e.g. a novel first published in another language, then translated; we technically have another way of doing it but it's really ugly). But it's optional. PARAKANYAA (talk) 15:31, 14 June 2026 (UTC)
- How does this testcase look? Mocked up in the sandbox, along with some improved word wrapping... About to call it a night but let me know if this looks good and I can push it tmrw. Zackmann (Talk to me/What I been doing) 05:43, 14 June 2026 (UTC)
Implemented Should be setup to merge. Can someone more familiar with the meaning of these parameters please update the documentation to properly document |published_in=? Zackmann (Talk to me/What I been doing) 18:11, 14 June 2026 (UTC)- I will do it. I've done it before. Though I still feel that
|published_in=should go above Publisher, which is how the original template did it and how {{Infobox short story}} does it. I think it makes more sense to first present the work it was published in, rather than the publisher of the work that the work published in. I think that order more clearly suggests that "Publisher" applies to the work that the work published in, rather than the work itself as if it had been published as a standalone book by that publisher. I don't know. Just seeing it in practice at N. (novella) appears a little confusing. Οἶδα (talk) 19:39, 14 June 2026 (UTC)
Done Flipped the order. That is an easy change! Zackmann (Talk to me/What I been doing) 19:42, 14 June 2026 (UTC)
- Thank you! Οἶδα (talk) 19:49, 14 June 2026 (UTC)
- And
Done. I wasn't entirely sure where to place it in the documentation given |published=isn't chronologically placed. And|published_in=will similarly be far less commonly used for books. But if I should place it chronologically just let me know. Also, if anyone has any suggestions for improving the description do share. I added the following:
Οἶδα (talk) 20:24, 14 June 2026 (UTC)published_in
Larger work in which the book was first published, e.g. a magazine, anthology, collection
- And
- Thank you! Οἶδα (talk) 19:49, 14 June 2026 (UTC)
- I will do it. I've done it before. Though I still feel that
- I feel like using publisher= for it is bad, not what the word publisher means; published is afaik for combining year and company in 1 parameter. Otherwise, I agree. PARAKANYAA (talk) 05:29, 14 June 2026 (UTC)
- Actually, it is apparently for the type of first publication (e.g. anthology or magazine), which is at least largely redundant to media_type (which is already for publication type e.g. hardcover/softcover/etc). So just replace that with that. PARAKANYAA (talk) 04:58, 14 June 2026 (UTC)