[pmwiki-devel] Thinking about attachments
Simon
nzskiwi at gmail.com
Tue Apr 14 21:17:21 PDT 2026
I'm thinking about a couple of PmWiki features related to files and
attachments.
When a file is "Attach:"ed to pm Wiki there are two of what I think of as
"handlers".
If the file has an image extension, a 'handler' generates image markup to
display the file as an image.
For all other file extensions a default 'handler' generates markup to allow
the file to be downloaded.
The question is, is it possible to add a handler for a set of file
extensions that generates markup specifc to those file extensions?
PmWiki supplies basics for managing attachments (or files) (e.g. a built in
(:attachlist <https://www.pmwiki.org/wiki/PmWiki/PageDirectives#attachlist>:),
(:if attachments <https://www.pmwiki.org/wiki/PmWiki/ConditionalMarkup>
...:)).
Pagelists <https://www.pmwiki.org/wiki/PmWiki/PageLists> does not recognise
attachments, however for images the awesome (to me) recipe Thumblist
<https://www.pmwiki.org/wiki/Cookbook/ThumbList>, and a few other recipes,
allow selection and enumeration of image files and their display.
There is a good recipe, Attachtable
<https://www.pmwiki.org/wiki/Cookbook/Attachtable>, to manage, select and
enumerate attachments.
Let's say I am looking at a new class of files, say with the extensions
.gpx or .kml.
Instead of displaying as a download link I'd like them to say use the %map%
markup from the ape <https://www.pmwiki.org/wiki/Cookbook/Attachtable>
recipe.
Also, I'd like some ability to select, sort, and enumerate them, not
dissimilar to the way thumblist works for images.
Before I develop anything I'm keen to hear how you think this could fit
into the existing PmWiki framework?
kia ora
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-devel/attachments/20260415/3934d288/attachment.html>
More information about the pmwiki-devel
mailing list