Publish a Catalogue with Pictures
For this example we are going to create a catalog that shows photographs offered for sale by our fictitious stock photo agency, Castlephotos. The photos are organised into Categories; the Categories are sorted in alphabetical order with the appropriate photos listed under each one, also sorted alphabetically by name. For each picture we will include the following data:
- The picture name
- The picture itself
- A description
- The name of the photographer
Step One: Set up a Publishing Style Sheet
Publishing Style Sheets tell CatBase:
- What data to publish
- How to sort it
- How to format it
The Publishing Style Sheet we are using for this project is called Picture Catalogue by Category FM(to view or edit Publishing Style Sheets, choose Publishing Style Sheets from the Publishing menu). It looks like this:
To specify the formatting of the Category headings, click on the Category Settings tab (in our example, we've chosen to use pictures for the headings).
Perhaps the most important thing here is the list of Paragraphs. This is where we specify exactly what data is going to be published and how it will be formatted. For example, the first paragraph will be the picture name, and it will be formatted using a style sheet called "Name". Paragraphs can contain any number of elements; there are seven element types:
- Data from a field in the database (Picture Name, for example)
- Static text (such as "Price, framed: ")
- A formula. Formulas are a very versatile tool which enable you to tell CatBase how to make decisions about what to include - or leave out - and optionally, how to format it.
- Punctuation (such as a tab character)
- A calculation (for example, you could discount all prices by 15% for a sale catalogue)
- A picture
- A relation (relations enable you to include information from a related table. In our example, the Pictures table is related to the Photographers table so when we are publishing Pictures, we can easily include information about the photographer who owns each picture).
Elements are the building blocks of paragraphs.
A quick look at the Prices paragraph (double-click on it in the list of Paragraphs) shows us that it is comprised of four elements:
The detailed workings of Publishing Style Sheets are covered in a separate Tutorial.
Step Two: Select the data you want to publish
Since, for this example, our data is sorted by Category, we start by selecting the category (or categories) that we want to publish (Animals in this case). CatBase will sort the categories and then find the Picture records that belong under each category and sort them. To select the categories, choose Categories from the Data menu or click on the Categories button in the Data floating window.
Step Three: Transfer the data
With the list of Categories displayed, choose Publish all These Records from the File menu, select the Publishing Style Sheet you want to use (Picture Catalogue by Category FM in this case), make sure that FrameMaker is selected as the publishing destination, and hit the OK button to create the transfer file. The transfer file will be in MIF format ("MIF" stands for Maker Interchange Format - this is the tagging language that FrameMaker uses).
Step Four: Import the transfer file into your Frame template
Open up your FrameMaker template, or create a new two-column document. We have included a simple template in the Goodies folder with the CatBase demo -it's called Catalog_2-col.fm.
We have set up the Demo with relative path names for all the pictures. They are all in a folder called Pictures, which is in the CatBase folder. In order for the pictures to import correctly, your transfer file must also be in the CatBase folder.
Now for the fun part ...
- With your Frame document open, make sure that the insertion point is in the first text frame.
- Choose Import -> file from the File menu.
- Select the transfer file you just created in CatBase.
- Select the Copy into dcument radio button
- Click on the Import button
Watch in amazement as the catalogue is created before your very eyes! It should look something like this:
"Animals" is the top-level Category
"Bears" is a sub-category.
The product information consists of:
- Picture name
- The picture itself
- A description
- The photographer's name
- Pricing information
... and it was all formatted automatically!
It really is that simple!