Saturday, January 15, 2011

Making InDesign Absolute Links behave like Relative Links

If you were to ask an InDesign user to show you a "Link" in InDesign, they would likely point you to the "Links" panel. However, there are additional types of links that we don't necessarily think about as often. These links refer to absolute file paths on your computer hard drive or server.
  • Cross references: linking to a specific paragraph or Text Anchor in an InDesign file
  • Documents in a book: the book file links to the documents within the book
So let's say that you want to start a new project that is based off of a similar one. But you want to keep the files totally separate. I used to work in a FrameMaker 7 workflow. And there are a lot of things about that workflow that I didn't like, but one thing that was cool about it was that Framemaker had the ability to have relative links. Relative links are commonly used in web development. In your design program (Dreamweaver for example) you can instruct it that all the images will be located in a folder called "images". It doesn't concern itself with anything above that, like where the images folder is located on your drive. The hard code in each html file just lists the path as images/. That way, you can upload the files to a server and the html files will simply still point to a folder called "images."

Relative Linking offers an amazing portability. Sadly (for better for worse) InDesign is not capable of relative linking. It can only do absolute links. This is typically great, but if you have a lot of files linked together and you need to reuse them for another another project, it can be a nightmare. But it doesn't have to be. Read on and learn from my pain.

If you want to use an old project (in this case a book) as a starting point for a new project, you could do it the hard way:
  1. Copy your old project folder into a new project folder.
  2. Open your new book file and manually replace each each chapter in the book (because the book will still be pointing to the ID files in the old location).
  3. Open each new InDesign file manually.
  4. Manually relink your images, one InDesign file at a time.
  5. Manually relink your cross references.
  6. Grumble in frustration for hours.
  7. Email your developer friends and see if they can write a script to do book-wide link updates within an entire folder.
Or you could do it the easy way.
  1. Copy your old project files to a new project folder.
  2. Change the name of the folder containing your old project files. I like to do something simple, like adding a dash or a space at the end.
  3. Open your new book file and do some global action such as:
  • Update a book-wide Table of Contents
  • Update all cross references
  • Update all numbering
For some reason, if InDesign can't find the links it's looking for (whether they are documents in a book, placed images, or cross references) it will look nearby and do it's best to find them. So if your book file in your old project was located in the same folder with all the document files, and now in your new project, the book file is still sitting right next to all the document files, InDesign somehow remembers the relationship. When you open your new book file, you'll get a little warning in the book panel. Those little yellow triangles are just letting you know that the files have changed. (They really haven't changed, but technically, they're now in a new location.)



Once you run some sort of book-wide global update, you can even go back into your old project folder and change the name back to what it used to be. Your new project is now completely disassociated with your old project.

This global-relinking is handy if for example, your server dies unexpectedly and you have to start immediately using your backup server... Or if you started a project on your desktop and then moved to your laptop (which has a different username, and thus a different file path), or you need to base one project off of another project and not have your original files accidentally updated.

I could kind of compare this to the time we moved down the street. We used to live one block away, in the exact same model of house. So this time, when we moved in, we already knew where all of belongings went. The inside structure was the same. It was just the outside structure that was different.

7 comments :

  1. I have wasted time for years relinking a hundred links and cross references within similar books. Thanks a ton for sharing this.

    ReplyDelete
  2. Does it work if the files are placed in one of the parent folders?

    ReplyDelete
  3. Way easier to use my script, that updates the links: https://github.com/raphaelmatto/indesign

    ReplyDelete