Graphic at the top of a tiddler?

68 views
Skip to first unread message

john mcginnis

unread,
Jun 27, 2020, 11:00:10 AM6/27/20
to TiddlyWiki
See sample.

Objective: Put the graphic at the top of the tiddler above the title/date/body. Or the graphic before the first tiddler for final redention.

Additional: I use a tool chain of tiddlywiki--> export to single html --> wkhtmltopdf --> pdf output

My first thought was to just create a tiddler with the embedded image and no title text. But of course a tiddler has to have a title. Ok, how about a non printable character for a title? From what I have tried that does not seem to work either. Any way to suppress the title and date of a tiddler?

Suggestions appreciated.


snap.png

Mat

unread,
Jun 27, 2020, 1:52:46 PM6/27/20
to TiddlyWiki
There are many ways to do things related to this but before going in the wrong direction it's best if you're really clear about what you want. For example, is it only for when you print a tiddler? And is that snapshot exactly how you want it to appear? You talk about not wanting a title, but you presumably mean not wanting the title to show (...when printed?and then you talk about a (single) character...?

Gotta be really specific or you make people help you with something you don't want. (I've made this mistake myself many times.)

<:-)

Mark S.

unread,
Jun 27, 2020, 2:15:46 PM6/27/20
to TiddlyWiki
Let's say you have a tiddler with an image: MyImage.jpg

Create a tiddler, say MyTemplate and tag it with $:/tags/ViewTemplate . Create it's contents like:

{{MyImage.jpg}}

Now an image will appear at the bottom of every tiddler.

Click on the tag pill "$:/tags/ViewTemplate". There will be a list of tiddlers, drag and drop MyTemplate to the top.

Now an image will appear at the top of every tiddler.

You probably don't want the image at the top of every tiddler. You need a method to flag which tiddler has the image. Let's say that only tiddlers tagged "myimage". Tag a tiddler "myimage". In "MyTemplate", edit the contents like:

<$list filter="[all[current]tag[myimage]]">
{{MyImage.jpg}}
</$list>

Now the image will appear only at the top of tiddlers tagged "myimage" .

TW Tones

unread,
Jun 27, 2020, 7:21:45 PM6/27/20
to TiddlyWiki
John,

Supporting Mats suggestion you define your needs a little clearer and you can see from Marks suggestion there are quick ways to achieve this, I will share one approach I use.
This is much quicker than you current approach.
  1. Ensure a tiddler looks as you wish it to (in its rendered body)
  2. then use the Open in new Window button, 
  3. If it looks as you wish to print then print it to pdf
    1. You may need to use a key combination like ctrl-p if you can find something in the new window
Now step 1 can be particular to tastes and the way the tiddler is constructed. I for one rely on view templates, these will not always be viewable correctly in step 3, in the new window, but there are a few tweaks than can help with that. One way is to import the macros etc... that are normally imported when displaying the tiddler in the story view.
You will see the toolbar is left out of open in new window view, but its trivial to get the title to display in the body to make it visible in the new window.

Regards
TW Tones

An Aside: If you install a generic text printer open in new window print to the text printer can also help "exporting" plain text output.
Reply all
Reply to author
Forward
0 new messages