User:Bureaucrat 37/sandbox/List of Clubs/Lua experiment

From Foodclubipedia
< User:Bureaucrat 37‎ | sandbox‎ | List of Clubs
Revision as of 22:59, September 25, 2022 by Bureaucrat 37 (talk | contribs) (→‎Initial results: furthermore, crap)
Jump to navigation Jump to search

Experimental use of a custom Lua module to handle formatting of a query's results, rather than letting Extension:External Data or Extension:Cargo do it. That way, I should be able to format things how I want, which those extensions don't seem conducive to.

Initial results

Inital results are officially: CRAP

The invoke seems to happen after at least some of the other processing, so for example if the module outputs something like {{blah}}, then it will show up on the wiki page as {{blah}} (as opposed to showing up on the wiki page as the results of calling the blah template).

I thought maybe {{subst}} or safesubst might help, as I know they're somehow used to do... something... that seems like it might be related to this, but:

  1. I don't currently understand them, and
  2. They don't help anyway. Well, they sort of do - the template is invoked, but its output is then put into the wikitext source of the page, replacing the invocation, so subsequent changes to the module won't be reflected on the page.

I dunno, I have to read documentation, I guess.

Invocation

The greatest

Attempt at template usage: {{large|The greatest}}

This is certainly the greatest Lua module I have ever written.

And, I might add, almost certainly the greatest Lua module ever written.

Post-invocation

Here's stuff after the invoke.