Posted 1250103151|%O ago by pieterh
This page lists practices which some of the more recent modules apply, which we'd like to see used everywhere.
All arguments can be passed in the URL by appending "/name=value" to the URL used to invoke the page and by specifying argument="@URL" in the module.
Modules should not generate surrounding page content, this is up to the template designer. Historically, modules did this heavily (e.g. forum modules), and this is carried over into (e.g.) Comments, which generates a H2 title and then allows users to disable this. It should not produce any title, ever, nor text such as "Add your comment".
(New) We want to be able to use all modules inline, using the syntax [[inline ModuleName...]]. Inlined modules do not output a division, are not block elements. Not yet sure if they can contain template code or not (wiki text between tags).
Don't you mean, by appending /name/value ? Or am I misunderstanding something here?
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
You spotted a drive-by improvement. :-) I need to review this with the devs but using slashes in between names and values is ugly, so I'd like to try equals instead. But there should not be two slashes there… I'll fix that.
Portfolio
Example of a situation where in-line modules are useful? =/
Struggling to think of one, but it sounds intriguing.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
So, CountPages is one. Also, modules like NextPage and PreviousPage. Any module that produces a button or action or information. Even ListPages, so that one does not need the hack of prependLine and so on.
Modules are becoming smaller, more precise and reusable tools and inlining lets them coexist with wiki content. I've always disliked wiki syntax that did work which could be done by modules.
Portfolio
spam removed