A problerm of my own making

My CentralStreetArchive wiki (http://cultconv.neocities.org/CentralStreetArchive/index.html) has a problem of my own making. I would like to show tables of objects by their thumbnail but there are two types of objects, PDF and JPG.

I can show the JPG’s in a simple html table (see for example the Posters tiddler) but for other category index tiddlers (see for example, Photos) the list includes both PDF and JPG. I would be happy to do 2 lists, one for JPG’s and the other for PDF’s. The trouble is that I do not know the type of content until Tiddlywiki accesses and displays the _canonical_uri details

`content list element —> content Tiddler —> canonical_uri tiddler —> external content file

Photos —> Photo: Alan Oldfield at … —> CS28 —> Images/CS28.pdf
`
So if I understand things correctly, I need to do a transclude of a transclude to get the format details from the canonical_uri tiddler.

My filter skills are not expert enough to figure this out and I am hoping someone on this list can assist.

I have a workaround, store a thumbnail of each content object on the content Tiddler. I can convert PDF’s to thumbnails through any of the many free sites on the web. A bit of work but do-able, needs to be only done once in any case.

I realised only recently that I should have just added the external link to the content tiddler rather than using the canonical_uri tiddler. That was a wasted design mistake since each cononical_uri tiddler is only pointed to by a single content tiddler. The link is one-to-one whilst my design allows many-to-one. Transclusion though facilitates many-to-one anyway but I did not grasp that when designing this wiki.

bobj

If you want to get the _canonical_uri of one of your Photo** tiddlers it looks like this:

[[Photo: Bo Jangel]get[object_link]get[_canonical_uri]]

So if you want to filter for PDFs it would look like this:

[has[object_link]prefix[Photo]] :filter[get[object_link]get[_canonical_uri]suffix[.jpg]]

has[object_link] … gives you every tiddler that has a field object_link
prefix[Photo] … will only list photos

:filter … is a filter run prefix that allows you to apply a second filter to your list, without loosing the name of the tiddler.

get[object_list] … will access the value of the object_list field of your Photo tiddler, which contains the link to your tiddlers tagged: Links.

get[_canonical_uri] reads the uri of the “links” tiddler

suffix[.jpg] … will only show uri’s which end with .jpg

So suffix[.pdf] … will only show PDFs

I think that’s it. If I did understand your description right.

Have fun!
mario

Thank you @pmario , I will give your suggestions a try.

Bobj