Forum:Unable to create infoboxes
ShoutWiki — express yourself and be heard!
Jump to navigation
Jump to search
Forums: Index → Community help
I'm trying to create an infobox template. Working with ShoutWiki's help pages and this forum post, I came out with this code and I only end up with a header and this:
|} |- |- |- |} |} |} |} |}
Can someone please tell me where I'm going wrong or if there's an easier way to create a template now? Fujimoto (talk) 05:22, 4 July 2019 (UTC)
- There are a couple problems I see right away.The syntax
{| align="right" style="background:#dd3333; border: 2px solid #333333; width:280px;" | style="text-align: center;" | <p style="font-size: larger;">'''{{{name|{{PAGENAME}}}}}'''</p> <div style="background-color: #fff; margin: 0 25px;"></div> |- | align="center" style="background:#333333; color:#FFFFFF;"| '''Basic Profile''' {| style="margin: 0 auto; text-align: left;" {{#if:{{{nameJp|}}}| ! align="right" width="80px" {{!}} {{{NameJp}}}: {{!}} {{{NameJp}}} }} |- {{#if:{{{nameEn|}}}| ! align="right" width="80px" {{!}} {{{nameEn}}}: {{!}} {{{nameEn}}} }} |- {{#if:{{{alias|}}}| ! align="right" width="80px" {{!}} {{{Alias}}}: {{!}} {{{alias}}} }} |} {{#if:{{{epithet|}}}| ! align="right" width="80px" {{!}} {{{Epithet}}}: {{!}} {{{epithet}}} }} |} {{#if:{{{affiliation|}}}| ! align="right" width="80px" {{!}} {{{Affiliation}}}: {{!}} {{{affiliation}}} }} |} {{#if:{{{gender|}}}| ! align="right" width="80px" {{!}} {{{Gender}}}: {{!}} {{{gender}}} }} |- {{#if:{{{birthdate|}}}| ! align="right" width="80px"{{!}} {{{Birthdate}}}: {{!}} {{{birthdate}}} }} |- {{#if:{{{birthplace|}}}| ! align="right" width="80px" {{!}} {{{Birthplace}}}: {{!}} {{{birthplace}}} }} |- {{#if:{{{height|}}}| ! align="right" width="80px" {{!}} {{{Height}}}: {{!}} {{{height}}} }} |} {{#if:{{{weight|}}}| ! align="right" width="80px" {{!}} {{{Weight}}}: {{!}} {{{weight}}} }} |} {{#if:{{{eyes|}}}| ! align="right" width="80px" {{!}} {{{Eyes}}}: {{!}} {{{eyes}}} }} |} {{#if:{{{hair|}}}| ! align="right" width="80px" {{!}} {{{Hair}}}: {{!}} {{{hair}}} }} |} |}
{{{word}}}
is for parameter substitution and is case-sensitive, so (for example){{{NameJp}}}
and{{{nameJp}}}
refer to different parameters. I suspect you intend for{{{NameJp}}}
to be some static text, like'''Basic Profile'''
is. Whether you intend that or not, you need to pass the values of the parameters into the template, which I suspect you are not. As a minor point, the<div>
in the first row has no content, so it doesn't do anything. I didn't read your code closely enough to check that every table start markup matches a table end markup, etc., but you have a lot of table end markup (|}
) that looks extraneous. We also have Help:Templates on this wiki to help editors learn about templates and Help:Tables for tables. --Saftzie (talk) 18:33, 4 July 2019 (UTC)- Thank you for the quick look. I'm trying to create infoboxes without portraits like most of the example code I've looked at has and I deleted some the code for that while accidentally leaving other parts pertaininging to portraits in. For NameJp I'm trying to do something similar to this infobox. Anyway, I just haven't found Help:Templates and Help:Infoboxes helpful because the former I couldn't understand and the later I tried to copy but would just make a mess of things. Fujimoto (talk) 19:11, 4 July 2019 (UTC)
- If you're having difficulty understanding templates even with the Help: pages, maybe it would be a good idea to learn with a simpler template. I seem to recall seeing a (somewhat splashy) tutorial on wiki markup on a WikiMedia site somewhere, although I can't find now. --Saftzie (talk) 16:37, 5 July 2019 (UTC)
- Thanks for the advice. I'll look into that. Fujimoto (talk) 21:22, 5 July 2019 (UTC)
- @Fujimoto and Saftzie: I know more about infoboxes. Export Template:Infobox, Module:Infobox, Module:Navbar, Module:Arguments and MediaWiki:Common.css from Wikipedia using Special:Export (it should be saved into a file) and import the file on you target wiki using s:w:lenen:Special:Import. Note that file is not a real “file” and it is instead an XML dump. —Znotch190713 (talk) 19:21, 14 July 2019 (UTC)
- Thanks for the advice. I'll look into that. Fujimoto (talk) 21:22, 5 July 2019 (UTC)
- If you're having difficulty understanding templates even with the Help: pages, maybe it would be a good idea to learn with a simpler template. I seem to recall seeing a (somewhat splashy) tutorial on wiki markup on a WikiMedia site somewhere, although I can't find now. --Saftzie (talk) 16:37, 5 July 2019 (UTC)
- Thank you for the quick look. I'm trying to create infoboxes without portraits like most of the example code I've looked at has and I deleted some the code for that while accidentally leaving other parts pertaininging to portraits in. For NameJp I'm trying to do something similar to this infobox. Anyway, I just haven't found Help:Templates and Help:Infoboxes helpful because the former I couldn't understand and the later I tried to copy but would just make a mess of things. Fujimoto (talk) 19:11, 4 July 2019 (UTC)