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
Stage One: Preparing to Publish
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 (to view or edit Publishing Style Sheets, click on the Style Sheets button on the main window and choose Publishing Style Sheets from the pop-up 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: ")
- 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
You can create Sets, which are groups of records meeting certain criteria. Sets can be automatically updated by the Event Scheduler. For this example, our data is sorted by Category, so we've created a Set called All Categories.
Step Three: Create a Publishing Project
With Publishing Projects, you don't need to remember the specific parameters for each project: which Set of data to use, which Publishing Style Sheet, etc. We've created one called Catalog by Category for Quark.
Stage Two: Ready to Publish
Step One: Publish the data
Click on the Publish data button in the main window and choose Catalog by Category for Quark from the pop-up menu. CatBase creates the transfer file and saves it into the specified folder (if you have not specified a folder in the Project, it will go into a folder called Data Exports on your desktop).
Step Two: Import the transfer file into your Quark template
Note: You must have the Xtags Xtension installed in the Xtension folder in your Quark folder, otherwise you will get an error message when you try to place the file. We have included a demo version of Xtags with our demo (you'll find it in the 3rd Party Demos folder).
Open up your QuarkXPress template, or create a new document. We have included a simple template in the Goodies folder with the CatBase demo. If you create a new document, you MUST save it into the CatBase folder first, otherwise the pictures will not import.
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 Quark document must also be in the CatBase folder.
Now for the fun part ...
- With your Quark document open, make sure that the insertion point is in the first text box.
- Choose Get Text with Xtags ... from the File menu (if it isn't there, that means you haven't installed Xtags in your Quark folder!)
- Select the file you just created.
- Make sure that the Include style sheets check box is checked
- Click on the Open button
Watch in amazement as the catalogue is created before your very eyes! It should look 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!