Topic on Help talk:TemplateData

options to select from wikidata-item-name? wiki-page-in-category-name? non-local-wiki-page-name?

3
Evolution and evolvability (talkcontribs)

There are options to pick from lists of local wiki pages/templates/users. We can also pick from commons files. Extremely useful would be to be able to pick from lists of:

  • wikidata items.
  • wiki pages within a certain category
  • wiki pages at a different wiki
FeRDNYC (talkcontribs)

The wikidata request is already tracked in task T69659.

As far as the other two, I don't see anything tracking them. They use the wiki-page-name type, and as @Krinkle says in task T88900 (a similar request to expand the field to specifically target pages in the Template namespace):

Types don't take parameters

In other words, the field accepts a certain type of data: A page name. And it can (using the wiki page database) validate that the data entered is, in fact, a page name. But,

  1. It can't be told to accept only certain specific page names (like "pages in category N"), and
  2. There's no way to validate the data as a page name at a different wiki, since it's not in the local database. (Commons files are a special case, since that's a different data type and the database does, AIUI, contain a list of available commons files.)

Still, in that same comment Krinkle did mention the possibility of adding Category as a type, which perhaps could work in concert with the the wiki-page-name field to limit the available pages. (The external-wiki thing, I'm less optimistic about, but any sort of informed statement on its feasibility would have to come from someone with better technical knowledge of the system.)

FeRDNYC (talkcontribs)

Actually, now that I think about it the "selector" functionality (a pop-up list of page names, for example) is more a Visual Editor feature than a TemplateData feature, since TemplateData only deals with validation and typing.

But if a Category type were added to TemplateData, and a TemplateData form had a field with that type that contained a certain Category, then it's certainly feasible that the Visual Editor could use that information to limit the list of pages it shows in the selector. (That's probably two separate feature requests instead of just one, though.)

Reply to "options to select from wikidata-item-name? wiki-page-in-category-name? non-local-wiki-page-name?"