It’s a while since I posted, so I will recap our use case. I produce a data dictionary of our cardiovascular data warehouse in TiddlyWiki during our build process.
A particular set of main tiddlers concern “Observations”, while other sets are “Measurements”, “Procedures”, “Devices” etc.
Each of these have a certain granularity they are grouped at for documentation - these are what I would call the Measurement tiddlers. So all the Mitral valve Doppler measurements are grouped in one tiddler that has the title “Mitral Valve | Doppler”, and that page is made up of sections. There might be many many other Measurement tiddlers like “Aortic valve | Area” and “Pulmonic valve | Regurgitation”, each holding the documentation for a grouped set of the things:
Within each Measurement, a page follows a template and the template transcludes tiddlers which represent the appropriate chunk of the page which is generated by the build process. And also transcludes tiddlers which represent the human additions of documentation to the wiki. Each of these, whether auto-generated or manually edited, are loaded as system tiddlers to keep them out of the way of the form:
$:/ascend/SOMEPREFIX:Name=Mitral valve|Doppler
Where SOMEPREFIX might be XText.Measurement for the main auto-gen table of information, and Text.Measurement.summary for some fragment that the user can edit.
And then the <> macro puts all this together with transcludes to make the “Mitral valve|Doppler” tiddler:
$:/ascend/Text.Measurement.preamble:Name=Mitral valve|Doppler ← user tiddler
$:/ascend/XText.Measurement:Name=Mitral valve|Doppler ← auto-gen tiddler
$:/ascend/Text.Measurement.summary:Name=Mitral valve|Doppler ← another user tiddler
$:/ascend/XText.Measurement.stcodes:Name=Mitral valve|Doppler ← another auto-gen tiddler
So all those prefixed tiddlers are designated elements of the tiddler with that Name.
So if we want to change the template for Measurements, we can change it in one place without having to rebuild every Measuement tiddler if the underlying tables and bits are still the same. The inner bits can be re-used in other pages and the auto-gen stuff never tramples on the human-gen stuff. All wonderful.
The problem comes in searching. Some of the content we want to be able to search is inside the transcluded tiddlers, but we would like search results for be able to show a list of basically the final outer tiddlers (the non-system ones).
We can generate the outer tiddlers completely in our build process if necessary, but that means the human part also needs to go through the earlier parts of the build process and kind of defeats the benefits. We could generate search text that is hidden during the build process on the main tiddlers, also needing to bring in the human template earlier.
Each of these elements does mainly go to one tiddler, so it would be possible to go from a fragment to a tiddler - even if they were remixed on a custom tiddler, we could tell the difference, so what I’m looking for I think is maybe a redirect from a tiddler to the tiddler that transcludes it or some other hints to make the search function more useful without losing a lot of the benefits of the transclusion system by generating whole tiddlers again.
Thanks in advance,
Cade