Sunday, 29 April 2012

The joy of (conditional) text

The other day I made a ham fisted attempt, with words and my mouth, to explain the workings of Conditional Text. I have a sneaky suspicion the person I was explaining it to was just being polite as I persisted to mumble and bumble my way through a terrible demonstration. In light of that moment, I am having another crack at it here, with these words and my fingers.

The price is right?
For this example, I will be working on the above advertisement. I am throwing my net far and wide for this one. It's a good product and I feel like drumming up some international business. As some of my prospective markets don't use Sterling, I am going to need to localise the ad.

Some solutions to this huge hassle could be to generate separate artwork files for each currency, have multiple text frames on multiple layers with each targeted to a country or to use Conditional Text.

Conditional Text. In a nutshell, it's a way to show and hide text based on the conditions you set through the Conditional Text panel. This can be found by going to Window>Type & Tables> Conditional Text. The center of the panel is where our soon to be created conditions will live. There is the usual fly out menu in the top right corner and a couple of buttons along the bottom. The panel is quite sparse, which is great, as this also means it's easy to use! 

Create a new condition by hitting the New Condition button or choosing New Condition from the top right menu. The next dialog box is pretty straightforward. The Indicator options below the Name field describe how text with applied conditions will appear in the document. The default is to place a coloured wavy line under any conditioned text, but if that's not hitting the spot for you then there are a few more options available.

Having created the conditions for each of the currencies I need, it is now just a matter of applying them to the text. Currently, I only have the one price on the page, and not much room, so I am going to copy the text first. Whilst it is highlighted, I can scoot over to the panel and tick the box next to the condition I want. In this first instance, that'll be the all powerful Sterling.

As I mentioned before, space is tight here so I am going to toggle the Sterling condition off with the eye icon and then paste text in the same spot. Once I have converted the price into Euros, I can highlight and apply that condition. Then I can do the same again for dollars. If I had plenty of room, I could have typed all three prices into the document to begin with and then highlighted each one in turn, applying conditions as I went along.

See anything you like
To toggle each condition on or off, just click the eye icons in the Conditional Text panel. If you want to quickly toggle all the conditions on or off, use Option/Alt+click. If you ever want to remove a condition from some text, highlight it and tick the [Unconditional] option at the top of the panel. The text will now always appear in the document as normal. You can also apply multiple conditions to pieces of text. If it starts getting a bit messy, the quick fix is to make the text [Unconditional] and then set the condition again.

When it's done, I have three prices in one text frame. Nice.

Fun with sets
Next up in this Conditional Text-athon are the almighty Sets. These allow you to toggle multiple conditions on or off with a single click. In this next document, I have already created some conditions and applied them to the relevant sections of text. There are a couple of potential layouts to do here. Layout #1 requires the full opening paragraph, a numbered list and the pull quote. Layout #2 needs to have the short version of paragraph one, a bulleted list, sub headings and no pull quote. This is the perfect time for Conditional Sets to shine.

If you don't have a drop menu for Sets at the bottom of your Conditional Text panel, choose Show Options from the fly out menu and it will magically appear. To create a new Set, simply choose Create New Set from the Set menu. Any conditions that are visible at the time you choose Create New Set from the menu will now be part of that Set.

In the first instance, I used the Additional Text, Numbered List and Pull Quote conditions and then created Condition Set 1. Then I changed the visible conditions and created Condition Set 2. Now, whenever I want to switch between them, I just choose the required Set from the drop down menu. It's all so easy! You can still override a Set by turning on or off conditions after selecting a Set, regardless of whether it is part of that Set or not. You can tell when a Set has been overridden by the + sign next to it's name. If you feel that this new improved version is the way the Set should be, then choose Redefine Set from the same menu. There are some other options scattered around the panel, which are all fairly self explanatory, so I won't go into them now.

Conditional graphics
Wouldn't it be pretty ace if you could apply Conditional Text to graphics? Sounds crazy! It's called Conditional Text after all, not Conditional Anything You Want. But there is a way to do it. If you have an anchored or in-line graphic or object in the frame, you can select it and apply a condition as if it were text. Once it's conditioned, it behaves exactly the same way and you can toggle it on or off at will! To select it, you may need to work in Story Editor, which is found in the Edit menu or by using the Command/CTRL+y shortcut.

Working again with the same document from the Sets example, I now need layout 2 not to include my splendid photo of a reptile! Luckily, this is easily remedied as it's actually an anchored graphics frame. As mentioned above, I am going to use Story Editor for this, as it allows for a simple selection. If the graphic was in-line (appearing within the same line as the text), however, you could  easily select it as if it were text. To bring up the Story Editor, click into the text in the frame, or just select the text frame, and then use the Command/CTRL+y shortcut.

To go into all the details of the Story Editor and what's so good about it will take a whole other post. I will, however, divulge some interesting points of note with regard to Conditional Text.

The above image is the Story Editor for my lizard document. As you can see, the text appears completely unformatted and there are some icons scattered around the place. Note that the conditioned text has the same colour indicator visible as it does in the document. Also notice the absence of the bullets for the bulletted text - as I said, completely unformatted! The eye icons sprinkled through the document represent hidden Conditional Text. You can test this by revealing some of the hidden text and the eye icon will disappear to be replaced by the text.

The anchor icon is the one I am interested in. This represents any anchored or in-line objects or graphics for the text frame. The anchor at the top of the text is my lizard photo. As before, I have created a new condition called Image. I can then select the anchor icon by left clicking and dragging over it in the Story Editor. When it's highlighted I then tick the corresponding condition. Now I can change the visibility for that condition and - hey presto -it's no longer shown in the document. The anchor icon in the Story Editor has been replaced with the eye icon. To tidy up, I could Redefine Condition Set 2 to always include the new condition settings for the photo.

I know that's quite a lot of Conditional Text information to take in but it is worth looking into. Just knowing it's there and what it's capable of makes it a great addition to anyone's InDesign arsenal.

No comments:

Post a Comment