#how to get parameters to show up in visual infobox editor?
34 messages · Page 1 of 1 (latest)
how do we make this
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
- Open source editor
- Click the button on the top left that says "Template Data"
- Add your parameter
- Fill out the data for it
are you using a Wiki skin perhaps
because when i open a template in source editor, i don't see the "edit template data" button
(i currently have the generic skin on my wiki but that's temporary)
is Extension:TemplateData enabled?
...it wasn't.
now it is though
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
Try taking out the auto-value parameter and definining the parameter type (String, Boolean, Page name, etc.)
which parameter type do i use for simple text
string
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
Can I try an edit to the template real quick?
go ahead
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)
np
i have noticed that the infobox's parameters don't quite get changed when i change them in visual editor on a different page, for some reason
is there a way to make the infobox usable for other pages? i'm pretty sure it's possible to have the same infobox across different pages, with different parameters on each page (the parameters should be editable on each page with visual editor)
@uncut junco
Please do not ping people. They'll reply when they are online.
alright
Better use Source Editor when editing Templates. VE and templates aren't a good match
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
for #1:
although the template did display the required information, it's parameters could not be changed using Visual Editor
i'm not a fan of this because i'd like that template to be editable in VE with different parameter values for different pages
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
i, along with several others on my Wiki, are not very skilled on Source Editor
along with this, some people on my Wiki edit on mobile devices, where Visual Editor would probably be easier to work with
#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."