Total Organizer help

 

Tools :: Exporting using templates

General Export tool

By choosing File | Export | Web page (HTML)... menu command you can save all visible (or selected only) items as a web page, i.e. using html. Then you can print it or send as an e-mail.

Among other options, you can select a template to use (first check the "Use one of the following templates"). Templates are a powerful tool, allowing you to completely control the layout of exported items, if you know HTML a little - and if you don't - you have this list to choose from, plus - more templates will arrive soon.

If you know the basics of html and you are interested in creating your own templates, please continue reading.

Creating your own template.

First go to a tab/folder full of notes, todos or contacts.

Now choose File | Export | Web page (HTML)... menu command, check "Use one of the following templates", then click "New" button (unavailable if you are in a "calendar" view). Enter a new name (e.g. My new template). Select this new template and hit "Edit" button.

What you see is a collection of edit boxes, in which you can enter a template. Let's start with a simple example:

In the #2 box ("The beginning") copy & paste the following piece of text:

<html>
<body>
My first template, just testing.

This is how every html document should start (more or less).

Now, in the #3 box ("Item - start") enter:

<br>An item goes here

Now, in the #6 box ("The end") close the  tags opened in #2 box ("The beginning"), like that:

</body>
</html>

And press "Preview" button. You default Internet browser should now start. By looking at the generated source code (View | source) you should see that Total Organizer simply copied the #2 template (the beginning) at the beginning of the document, text in #3 box ("Item -start") was repeated  for every item being processed - if any items were visible before you started experimenting with this tool. At the end, your #6 template was copied.

Everything's fine, but no item-related information was generated. How to accomplish this? How to tell Total Organizer where to put e.g. given item title or other variables? The answer is: by using special strings, often called "tokens". For example "%org_title%" (without the quotes - notice the % characters) will be replaced with item's title while  generating the document. So let's come back to the #3 box ("Item - start") and replace its contents with:

<br>item title: <b>%org_title%</b>

The %org_title% "token" will be replaced with given item's title. They're enclosed in "<b>...</b>" html tags to make it bold. Now, again, press the "Preview" button. You should see #3 template copied for every item, replacing the token every time.

Let's now add another variable, replace the #3 box contents with:

<br><b>%org_title%</b> (%org_item_type%)

After pressing the "Preview" button you will see an item's type in next to its title, enclosed in (). So, you should now understand that everything is simply copied, except for variables in %%. To see a list of available variables, click the "..." button.

With this knowledge you can already create nice looking templates. But, you have enter all the variables (tokens) in the template - which may be very frustrating since in the application you can create many of them (Fields management). Besides - what if you'd like to use one template for different types of items (notes, contacts etc)? They differ in fields (variables) they hold. This is why Total Organizer complicates things a little - there is not one "Item template" - instead, there are three of them. One of them you've already used, the "Item - start" template. But let's experiment with all of them:

In the #3 box ("Item - start") enter:

<p style="border:1px solid orange">%org_title%

As you can see, we open the "<p>" tag (a paragraph) with a border and put item's title, now in the #4 box ("Item - variables") enter this:

<br>%var_name%:%var%

Just like #3 box ("Item - start") is repeated for every item, the #4 box ("Item - variables") is repeated for every variable which the item holds. After pressing "Preview" you should see something like "Priority:50%" because "%var_name" was replaced with given variable name (e.g. "Priority") and "%var%" was replaced with the contents of a variable.

That's it - experiment with this tool - experiments are the best teacher. You may also want to look at the existing templates to see how they're done - just remember - they will be replaced (reseted) during the installation of new version of Total Organizer, so instead of modifying them, it's better to create your own. Note also, that the templates are simply files (actually, folders with a file named "template.org_export_template")  which means you can copy the files/folders around, create a new template based on an existing one, rename the templates - all of this using your file manager.

And after you created a nice template, why not share it with the community? You can upload a template file by using the "Upload a file" link visible at the forum page.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright Konrad Papala.  Total Organizer online