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

From Foodclubipedia
< User:Bureaucrat 37‎ | sandbox‎ | List of Clubs
Revision as of 23:14, September 25, 2022 by Bureaucrat 37 (talk | contribs) (reconsideration)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

Official initial results

Initial 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.

Reconsideration of official initial results

Now I think, ehhhhhh, might not be so bad. As long as I can do stuff like [[linking to some page]] and '''making things bold''', which it seems like I can, then being unable to invoke templates may not be a dealbreaker. Will think about some more and play around a bit before officially officializing the official initial results.

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.