Topic on User talk:Shirayuki

Hooks in extension templates

3
Tgr (talkcontribs)

Hi, thanks for your work of keeping hooks up to date!

FWIW, hooks (to the extent they can be identified from extension.json) are available in structured form via Module:ExtensionJson. If you are familiar with Lua coding, a more sustainable approach might be to make the extension template read them from there when no hook parameters are manually provided. (The same goes for a number of other extension fields as well.)

Shirayuki (talkcontribs)
Tgr (talkcontribs)

Yeah, I imagine we'll have to end up with some way to manually add hooks to the template. Maybe just interpret hook1 etc. as additional hooks (but then the template would have to deduplicate), maybe have dynamichook1 or something like that.

(The structured data also wouldn't work for extensions which have not been ported to extension registration yet.)

Reply to "Hooks in extension templates"