Lots of challenging learning curves in Tinderbox, but so far the most challenging for me has been understanding how to export documents. What I thought was going to be the easiest module has turned out to be the opposite.
I don’t claim to have figured it out, but I thought I would share what I (think) I have figured out, in the hope it might be corrected or simplified by wiser heads than mine, and might help any still befuddled. I have benefitted hugely from several guides and tutorials by other Tinderboxers, but none quite worked for me, so I’m hoping this might be the start of a tutorial which makes the process easier. (Or someone can point me to a tutorial that is simpler than this one, and doesn’t leave vital steps and definitions out!).
This is what I understand is the process for exporting documents that can include values from the documents’ attributes.
You need three documents to make this work:
- A format template . This can be one of the built in templates or one you create.
- An export template — what you want the document to look like, with values for the various bits you want to insert from Attributes)
- the source document — where the text and values are coming from
Make sure you have the Built in HTML template (Click File/Built in Templates /HTML) loaded. This should create a prototype called HTML Template , in a folder called, confusingly, Prototypes .
Create an Export template as you’d like to see your finished document (with all the attribute values) exported. It’s wise to just create the document as you’d like to see it with all the actual values in, then save it as an export template (say, Letter Template , or Note Template . This is not a prototype . It seems to be best saved in a Container called Templates because that’s where Tinderbox will look.)
Once you’ve saved that document, replace ^value()^ for any attribute where the brackets contained the attribute, eg ^value($FullName)^ . Where you want the text of the source document to be reproduced, just put ^text^ .
Once that’s done, you now have a template. You can confirm this is the case by clicking on the Inspector’s Properties Inspector tab. Of the three buttons below the Prototype drop-down menu, Template should be checked.
Now set this as the template for the source document you want to export (open the Inspector, go to HTML Inspector, choose Export, then Template . The drop-down list should include the template you just made.)
Back in the text pane, you should then be able to preview what the document will look like once exported by clicking on the button Preview and in HTML (if you can’t see these buttons at the top of the pane, select Text Pane Selector from the Window menu. ) I don’t believe, contrary to some guides, you need to change the prototype of the document at any point.
To export you can just copy and paste the result in preview or HTML into whatever document you’re working on. Or you can choose Export Selected Note from the File menu.
If you want to export a series of documents , put them in the same container, ensure they all have the right template assigned, and then for the container note, create a separate template with one line: ^children^ in it. Assign that template to the container and then just export that as the selected note. There won’t be a gap between them but that should work.