Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Setting conditional text

From: InDesign CS4 Beyond the Basics

Video: Setting conditional text

Here is a cardinal rule of being efficient in InDesign, do more with less. For example, let's say this catalog will be printed and distributed in both the US and the UK. You could make two different files but that is not very efficient, especially if you later needed to make edits. You would end up making each edit twice. Fortunately, InDesign CS4 has a new feature called conditional text, which lets us turn on and off different aspects of our document. Let me show you how it works. I will go to the Window menu and choose Conditional Text from the Type & Tables submenu. The Conditional Text panel shows us all the different conditions in our document and right now it only shows us Unconditional. Any text set to Unconditional will always be visible no matter what you turn on and off. I am going to select this text frame and zoom in to 200% by pressing Cmd+2 or Ctrl+2 on Windows and I can see that there are two different prices in here, the US price and the UK price.

Setting conditional text

Here is a cardinal rule of being efficient in InDesign, do more with less. For example, let's say this catalog will be printed and distributed in both the US and the UK. You could make two different files but that is not very efficient, especially if you later needed to make edits. You would end up making each edit twice. Fortunately, InDesign CS4 has a new feature called conditional text, which lets us turn on and off different aspects of our document. Let me show you how it works. I will go to the Window menu and choose Conditional Text from the Type & Tables submenu. The Conditional Text panel shows us all the different conditions in our document and right now it only shows us Unconditional. Any text set to Unconditional will always be visible no matter what you turn on and off. I am going to select this text frame and zoom in to 200% by pressing Cmd+2 or Ctrl+2 on Windows and I can see that there are two different prices in here, the US price and the UK price.

I want to make one condition that will show me the US prices and another condition that will show me the UK prices. So to do that I go to the Conditional panel and I click on the New Condition button at the bottom. I am going to call this one UK Prices. The Indicator settings are not important most of the time; it's just a matter of how those conditions are going to show up on screen. I will click OK and there is my UK Prices. Let's make another one, which is US Prices. Note that this one is going to be Red instead of Blue. And those different colors show up here in these swatches on the side. Now it is time to actually apply those conditions to some text.

I will double click inside this text frame to switch to the Type tool, I will select the dollar amount, and I am just going to click on US Prices. Now I will select the pound amount, it is 3.75, and I will click on UK Prices. It is as simple as that. I can't see the indicators because I am currently in Preview mode. So why don't I go up to the Application bar and switch to Normal mode. And now you can see the stuff that has a wavy red underline is US Prices. I know that because it is red and US prices has a red swatch next to it. The text that has the blue wavy underline is the UK Prices. Once we have applied those conditions, we can hide or show them. For example, I will click on the little eyeball next to UK Prices and it just disappears. Or I can click on that to turn it on again and turn off the US Prices. Now I only see the UK price.

Here is a little tip. You can hold on the Option key or Alt on Windows and click on the Visibility icon to toggle the other conditions. For example, if I click on the US Prices Visibility icon with the Option or Alt key held down, it turns off all the other conditions except for Unconditional. Remember, Unconditional is always visible. As you might guess from the name Conditional Text, this only lets you apply conditions to text in your document. But sometimes there is other elements in your document that you wish you could turn on and off. For example this NO 5, I want to make this NO 5 logo a special icon indicating that it is a special product item in the catalog. But I want to be able to turn it on and off at will. It is not text so how will I make it Conditional Text? Well, I have to anchor it as an anchored object. So I will go the Edit menu, I will cut it out, I will double click after this word or I could put it anywhere in this text frame really, and then I will paste it in here. Now it is an anchored object. I need to put it outside of the text frame so I am going to right click on it or Ctrl-click with one button mouse, go to Anchored Object, click on Options, and then change the Position to Custom.

I have discussed the details of the Anchored Objects in an earlier chapter so it's suffice to say for now I can simply turn off Keep within Top/Bottom Column Boundaries, click OK, and then just drag it to where I want to put it. I will put it up here a little bit. Now how do I assign a condition to it? You have to select the Anchored Object marker inside the text. To be honest I have already forgotten where I had put it. I was working so quickly. So I am going to select the frame that has a story in it, and I will got the Edit menu, and choose Edit in Story Editor. The Anchored Object shows up here very clearly, that little icon. And I can drag over it in the Story Editor and apply my special condition to it.

I need a new condition in here called Special. So I will click on the New Condition button and I will just call this Special item. Click OK and then I will click once on Special item to move the checkbox here. When I close the Story Editor, you will see that this now has a green outline indicating that it is a Special item Condition. Let's try it out. I will hide that condition and the object disappears. I will show that condition and it reappears. This technique of using Anchored Objects is how you would make tables conditional too and even images. Just anchor them in the text and then set the condition in Story Editor.

Often when you are using the Conditional Text panel, you will find yourself with lots and lots of conditions, far more than I have listed here. And then it becomes a real pain to turn them on and off in certain sets. Like maybe I want the UK Prices and all the Special items, and you will have to do a lot of clicking on and off all the time; that is just a pain. So Adobe added a Conditional Text Set feature and I can see it down here at the bottom of the panel. Now you may not be able to see it, it is hidden most of the time. If you do not see it, go to the Conditional Text panel menu and choose Show Options.

That's how it looks when it is hidden. That's what it looks like when it is showing. All it is this one pop-up menu that let's you save sets of conditions. To make a set, turn on and off the conditions that you want in the set, then go to the Set menu, and choose Create a New Set. I will call this UK Special Items. Click OK and it shows up here. Now maybe I will turn off a couple of these and just say only the US Prices. I will make a new set here called US Regular Items; so not the special ones. Click OK and now I have two different sets in here.

To choose them, I just choose them for the menu. There is my UK Special Items with a special icon and the UK Prices. Here is the US Regular Prices with the US Prices and no icons. Now it would be really annoying if I had to go through my whole document selecting the text and clicking on a condition, and selecting some more text and clicking on a condition. In this case, it would be great if I could find a pattern like, find all the things that look like UK Prices and just assign that condition to them. But we can do that if we use GREP Find and Change.

I will open the Find/Change dialog box by pressing Cmd+F or Ctrl+F on Windows. And by the way, I will need to make sure all of my conditions are turned on for this to work. So I will go ahead and turn all of those on. And in the Find/Change dialog box, I am going to make sure I am in the GREP tab, and I am going to find anything that looks like a pound price, pound and then some numbers after it. To do that I will just type the pound symbol on my keyboard, and I will come out here, and I will say, I want to find anything that is a Digit. And I will say, one or more of those from the Repeat panel. We talked about GREP in an earlier movie so this should be simple for you. One or More Times.

And then I am going to type a period, which means any character, any single character. It could be a period, it could be a comma depending on the currency, and then I am going to say, let's get some more digits in here. So one more digit. In fact, I happen to know that this is always going to be two digits. So this is going to be a price. A pound sign, one or more digits, then a dot, and then a couple of more digits. Let's see if it works. I will click Find and it jumps right to the first one. So I can tell that my GREP pattern worked great. Now I want to apply a condition to it. I will check one more time just to make sure all the conditions are going, and then I am going to click anywhere in the Change Format field that opens the Change Format dialog box. And I will click on the Condition pane. Here is the list of all the conditions in here and I want to turn on the UK Prices. Click OK, and I can see that I am going to find anything that looks like the UK Price, and apply that condition to it. I feel pretty confident in this so I am just going to click Change All, and we can see it went through my whole catalog and made a bunch of changes.

Let's do the same thing with the dollar sign in front of this instead. I will delete the pound symbol and I will put a dollar sign in instead. But in this case, I happen to know that I can't just use a dollar sign that is a reserved special character in GREP. I have to type \$. And this one is not going to go to UK Prices; it is going to go to US Prices. Here we go, click OK, and change all of those. When I close the Find/ Change dialog box, you can easily see that the wavy colored underlines are underneath those prices.

I am going to de-select everything with a Cmd+Shift+A or Ctrl+Shift+A on Windows, go back to Preview mode, and we will see how it works. I am going to choose the UK Special Items Set and you can see that suddenly I will only see the UK Prices throughout the entire document. Let's go and see the US Prices. There I go; it is as simple as that. In a later chapter, we will see how you can even turn on and off these conditions across multiple documents in a book with a single click. But for now let's take a moment to look at one more new feature in CS4, the ability to make Cross References.

Show transcript

This video is part of

Image for InDesign CS4 Beyond the Basics
InDesign CS4 Beyond the Basics

90 video lessons · 24836 viewers

David Blatner
Author

 
Expand all | Collapse all
  1. 2m 11s
    1. Welcome
      1m 3s
    2. Using the exercise files
      1m 8s
  2. 25m 16s
    1. Reviewing Control panel shortcuts
      8m 34s
    2. Managing panels
      6m 14s
    3. Letting InDesign do the math
      2m 52s
    4. Using Selection tool clicks
      1m 39s
    5. Using Quick Apply shortcuts
      3m 2s
    6. Setting up context shortcuts
      2m 55s
  3. 23m 51s
    1. Using column guides
      3m 42s
    2. Formatting and positioning guides
      5m 15s
    3. Setting first baseline options
      5m 30s
    4. Using the Document grid
      3m 13s
    5. Setting bleeds
      3m 3s
    6. Using slugs
      3m 8s
  4. 48m 2s
    1. Shuffling pages (or not)
      2m 47s
    2. Scaling objects to a specific size
      2m 32s
    3. Aligning objects to a page
      4m 41s
    4. Using advanced libraries
      4m 5s
    5. Using advanced anchored objects
      11m 21s
    6. Setting non-printing objects
      3m 10s
    7. Creating notes
      5m 23s
    8. Using Data Merge
      10m 41s
    9. Creating templates
      3m 22s
  5. 39m 32s
    1. Creating polygons and starbursts
      2m 35s
    2. Setting custom stroke styles
      5m 15s
    3. Using advanced effects
      8m 46s
    4. Making masks in InDesign
      4m 10s
    5. Integrating InDesign and Illustrator
      4m 59s
    6. Setting compound paths
      5m 4s
    7. Using advanced clipping paths
      6m 6s
    8. Using advanced image transparency
      2m 37s
  6. 55m 26s
    1. Using advanced text formatting
      5m 37s
    2. Using other languages
      4m 22s
    3. Setting advanced paragraph numbering
      3m 12s
    4. Using GREP to find/change
      6m 54s
    5. Managing glyphs
      5m 6s
    6. Finding and changing glyphs
      2m 39s
    7. Adding footnotes
      7m 57s
    8. Creating outlines
      3m 39s
    9. Setting conditional text
      9m 16s
    10. Creating cross-references
      6m 44s
  7. 33m 3s
    1. Advanced text importing
      7m 49s
    2. Using Apply Next Style
      5m 4s
    3. Advanced text styling
      6m 9s
    4. Setting load styles
      2m 58s
    5. Linking to text files on disk
      4m 1s
    6. Understanding GREP styles
      7m 2s
  8. 1h 4m
    1. Building a multi-document book
      4m 42s
    2. Setting page numbering across books
      7m 53s
    3. Setting chapter numbering
      6m 7s
    4. Using the Section Marker feature
      6m 53s
    5. Creating "Continued On..." numbers
      4m 44s
    6. Synchronizing documents in a book
      5m 41s
    7. Creating a table of contents
      11m 24s
    8. Indexing documents
      7m 24s
    9. Generating an index
      6m 47s
    10. Printing or exporting a book
      3m 10s
  9. 46m 4s
    1. Creating hyperlinks
      12m 53s
    2. Setting bookmarks
      6m 7s
    3. Creating buttons
      11m 16s
    4. Making movies
      8m 24s
    5. Creating sounds
      4m 51s
    6. Setting page transitions
      2m 33s
  10. 25m 59s
    1. Setting up swatch and style defaults
      3m 24s
    2. Using mixed ink colors
      6m 16s
    3. Working with duotones
      4m 23s
    4. Overprinting
      2m 10s
    5. Ink aliasing
      4m 50s
    6. Using the Kuler panel
      4m 56s
  11. 50m 27s
    1. Creating the transparency blend space
      4m 6s
    2. Understanding InDesign color settings
      9m 8s
    3. Assign Profile and Convert to Profile
      3m 26s
    4. Working with RGB images
      7m 54s
    5. Working with CMYK images
      6m 28s
    6. Soft-proofing
      5m 18s
    7. Managing color at print time
      7m 25s
    8. Managing color in a PDF export
      6m 42s
  12. 42m 1s
    1. Embedding preflight profiles
      5m 1s
    2. Using the Transparency Flattener preview
      3m 23s
    3. Reviewing Transparency Flattener settings
      6m 30s
    4. Setting print presets
      3m 35s
    5. Setting PDF presets
      3m 21s
    6. Exporting to XHTML
      7m 42s
    7. Exporting to SWF
      6m 45s
    8. Exporting to XFL
      5m 44s
  13. 25m 58s
    1. Understanding XML and InDesign
      6m 51s
    2. Structuring InDesign content
      4m 17s
    3. Importing XML
      6m 57s
    4. Exporting to XML
      7m 53s
  14. 34s
    1. Goodbye
      34s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed InDesign CS4 Beyond the Basics.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.