#how to get parameters to show up in visual infobox editor?

34 messages · Page 1 of 1 (latest)

flint anvil
#

TemplateData

vagrant geyser
#

i have several infoboxes on my Wiki, but none of them have documented parameters that show up in visual editor and i'm pretty annoyed by this

uncut junco
#
  1. Open source editor
  2. Click the button on the top left that says "Template Data"
  3. Add your parameter
  4. Fill out the data for it
vagrant geyser
amber flame
vagrant geyser
vagrant geyser
#

i have made a template and defined it's parameters with "edit template data"
however, when i insert it into an article and add values to parameters in Visual Editor, they don't show up in the article
i may have done something wrong during the parameter setup, but i'm unsure what

the template in question is https://morphforgewiki.miraheze.org/wiki/Template:NPCInfo by the way

MorphForge Wiki
uncut junco
#

Try taking out the auto-value parameter and definining the parameter type (String, Boolean, Page name, etc.)

vagrant geyser
uncut junco
#

string

vagrant geyser
#

aight

#

didn't work unfortunately

the template above in the picture (which is the new template) is supposed to look like the template below, however it's appearance didn't change even after taking out the auto-value parameter and defining Location and Purpose's parameter types as strings

#

@uncut junco

uncut junco
#

Can I try an edit to the template real quick?

vagrant geyser
uncut junco
#

Seems to work just fine

#

I removed the auto-value parameter directly (it had been set to empty quotes/null, and I was unsure if that was affecting the formatting) and wrapped your infobox in <includeonly> tags (not exactly necessary since you already had <noinclude>, just ensures that only your infobox is the part of the template that's added to pages)

vagrant geyser
#

alright

#

thanks

uncut junco
#

np

vagrant geyser
vagrant geyser
#

@uncut junco

errant glacier
vagrant geyser
#

alright

errant glacier
#

Better use Source Editor when editing Templates. VE and templates aren't a good match

uncut junco
#

Not sure what you mean for #1, a screenshot or screen capture would be helpful

For #2 wdym? Infoboxes can be placed on any page. Afaik parameters can't be limited to per page, but you can use a parser function to ensure the fields only appear in the infobox when a value exists for them. But if there's more than, idk, two of those then I'd probably just make a new infobox

vagrant geyser
#

for #2: i don't consider making a brand new infobox for every NPC to be a sustainable and long-term solution - i firmly believe one infobox can hold different parameter values in different pages (or atleast that's how infoboxes on Fandom work)
from what i know, both Miraheze and Fandom rely on MediaWiki, so this shouldn't be a problem

vagrant geyser
uncut junco
#

#1 - changed the parameters on the NPCInfo template to match the names so they'll be editable now BUT there is a Visual Editor bug where it will look as if it won't update when Previewing. You'll have to swap to Source and Preview to see if it works as intended.

#

For #2 I still don't know what you mean, sorry - when you put the infobox on another page you can put anything you want in a field and it will show up. You can't have parameters per page, like "Only show a parameter npc-mood in the Visual Editor if it's the character Blompf's page."

If you have fields in a template that you don't want to fill out for every NPC, you just leave them blank, and they won't show up if they're not set as Required