Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

Using Conditional Text for Web Addresses in Multi-Channel Publishing

Using the same layout for a print and digital version of a project? There are plenty of challenges to overcome in that scenario, one of which is how to deal with web addresses. In the print version, you need to tell your audience the full address to enter in their browsers. But in the digital version, that’s unnecessary. All you want is a simple hyperlink. Hmm, two versions of text in one layout…sounds like the perfect time to use conditional text!

Open the Conditional Text panel (Window > Type & Tables > Conditional Text). In the panel, create two new conditions, one for the print job and the other for the digital product.

conditional text for web addresses in multichannel publishing

Create two versions of the text about the link. Include the full URL in the print version, and create a live hyperlink in the digital one (Keith Gilbert’s script for automating the production of hyperlinks from URLs may help with this task).

Assign the conditions to the appropriate text. Find/Change might be able to help you with this job. Search for text styled with your hyperlink style and apply the web/digital condition.

find/change to apply conditional text for multichannel publishing

Then search for your URLs and apply the print condition. If you’re dealing one URL (or just a few), search for the exact text.

find/change to apply conditional text for multichannel publishing

If you’re searching for many URLs, then you need a GREP search. And GREP expressions for finding URLs are like bellybuttons. Everyone’s got one. None of them is perfect.

You could start with this one by John Gruber and see if it works for you. And no, I will not be explaining how it works ;)
(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|(http|ftp|www)\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()]+|\(([^\s()]+|(\([^\s()]+\)))*\))+(?:\(([^\s()]+|(\([^\s()]+\)))*\)|[^\s`!()\[\]{};:??.,?«»????]))

When you’re working on the print version, hide the digital condition, and vice versa.

conditional text for web addresses in multichannel publishing conditional text for web addresses in multichannel publishing

At output time, double-check that the right condition is showing, and you’re good to go.

Mike Rankin

Mike Rankin

Editor in Chief of InDesignSecrets.com, InDesign Magazine, and CreativePro.com. Author of lynda.com courses on InDesign and Illustrator. Husband. Dad. Dog walker.
Mike Rankin

Latest posts by Mike Rankin (see all)

  • - November 30, -0001
Tags
Related Articles
Comments

2 Comments on “Using Conditional Text for Web Addresses in Multi-Channel Publishing

  1. Thanks for this!

    Is there a way to add the “Conditional Text” to a paragraph or character style?
    That way it could be stylized along the way without doing a find and replace…

    Alain

Leave a Reply

Your email address will not be published. Required fields are marked *