So I looked into the Vanilla theme and found the @media print lines that hide certain segments of the TW interface. This is almost perfect for my usecase, but would it be possible to selectively show content rather than selectively hide it?
In my usecase, I would really only have 1 print-ready tiddler open at a time. I do not want to print the title of the tiddler. I might have 3-5 other tiddlers open that I was working on that I would also want to exclude. Furthermore, the print tiddler itself has some tabs in the body that I use for navigating between different lesson plans within a unit. I don't want these to print either, just the text of the lesson plan itself.
Here's what I tried. I went into the $:/core/ui/ViewTemplate and wrapped it in a <div class="exclude-from-print">
\define frame-classes()
tc-tiddler-frame tc-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ $(tiddlerTagClasses)$
\end
<div class="exclude-from-print">
<$set name="storyTiddler" value=<<currentTiddler>>><$set name="tiddlerInfoState" value=<<qualify "$:/state/popup/tiddler-info">>><$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
</div>
</$tiddler></$set></$set>
</div>
Then I went into the vanilla-base stylesheet and added .exclude-from-print to the @media print section that hides the sidebar and the topbar. Boom, now when I went hit print in Firefox, the page was blank.
Then I added the following lines right below that:
.print-document {display: block !important;}
I wrapped up my desired print content in a <div class="print-document">, however this failed to override the exclude-from-print class and when I go to print, I still see a blank page. Any suggestions?
Thanks,
Patrick