Smart Connection, Enterprise and Javascript – upload selected images

Here’s something that I wrote back in May 2010.

The customer’s request was the ability to take images that were placed on the pasteboard of the InDesign layout and put them into the Layout’s Dossier.

This is what I wrote. Place the images on the pasteboard, select the images and run the script from the Scripts panel in InDesign.

The end result will be that the Images will end up in the same Dossier as the Layout.

The customer never did implement this as, in the end, they decided that the staff resources that it would take to maintain this didn’t fit with their plans. Not sure about that…

NOTE: The one thing about this script is that it’s a prototype. I never did implement the error checking that I should have. For instance, you need to be sure that the status you enter at the top of the javascript file matches what you have in the system

Perhaps I’ll do that…


I wrote a little Javascript for Enterprise

One of our partners asked if Enterprise had a feature that allowed the user to check out all of the articles that were attached to a layout in one move.

Answer: No

BUT…we do have our friend javascript AND in addition to that we have ‘Before’ and ‘After’ Events for the Enterprise plugins

So, the script below can be used in one of two ways.

Add the script to the Script Panel in InDesign and when the user WANTS to check out all of the articles…use the script by running it.

Or it could be tied to ‘AfterOpenLayout’ event. This would check out all of the article every time a layout was checked out.

You decide.

// Script: Checkout articles on layout
// Language: JavaScript
// Author: jag
// Company: WoodWing USA
// Date: 18 January 2010
// Description: When this script is invoked it will check out all of the articles
// attached to the targeted layout
// Identify the current document
var doc = app.documents.item(0);
// Access the document’s articles
var mas = doc.managedArticles;
//Count the number of managed articles
var countOfManagedArticles = doc.managedArticles.count();
if ( countOfManagedArticles > 0)
for( var i = 0; i < countOfManagedArticles; ++i)
var getTheMetaData = doc.managedArticles.item(i).checkOut();
} catch( e)
desc = e.description;
num = e.number;
alert( “Check out article script error ” + num + “: ” + desc );

Changing Issue Information in Enterprise

One of our customers was asking what the best practices were in moving assets from one scheduled issue to another. They were discussing moving layouts from issue to issue but I wanted to insure that they were prepared for using the multi-channel aspects of Enterprise.

Note that, of course, moving layouts around is easy to do…just not the best practice.

  1. Layouts can only be assigned to ONE issue. No more. Either a Print channel or Tablet Channel.
  2. All other object types such as Articles, Images, Video, etc can have ONE or MORE channel/issue combinations. These channels might include ‘Print’, ‘Tablet’, ‘Web’, ‘Facebook’.
  3. Layouts do NOT inherit the Issue of the Dossier they are in.
  4. Articles and Images WILL inherit the ‘print’ issue of the Dossier they are in.
  5. Articles and Images WILL inherit the issue of the layout they are attached to.
  6. Changing the Print issue that a dossier is assigned to WILL change the issue of the layout IF the Layout is in the same issue as the Dossier at the time of the change.
  7. If the Layout has a different Issue assignment than the Dossier then the Issue date of the layout will NOT change. The net result of this is that the ‘Issues’ column in the views will show multiple issues assigned for Articles, Images and other files.
  8. Changing the Issue of the layout will change the Issue of the attached articles and images.

Because of the above there are scenarios where a user could change the Issue of a layout in the ‘Properties’ dialog and depending on the view and filters applied in the Smart Connection palette the user may or may not see the layout (and attached objects).

The end result is that the ‘Dossiers’ should be moved between Issues and not Layouts.

Best Practices

  1. Consider Dossiers as the ‘article’ or ’section’ containers. Keep in mind that more than one layout/article can exist in a Dossier. When you start doing tablet production you may wish to have more dossier/layout combinations to help with navigation of content.
  2. Only change the Issue on a Dossier. Doing so will change the Issue on all the other objects such as layouts and articles. Following this suggestion will greatly simplify things.
  3. Use Content Station to change the Issue of the Dossier. This can be done in the Planning application by dragging the Dossier from one issue to another, by searching for the Dossier and invoking the ‘Properties’ dialog or by opening up a tab for the Dossier and using the ‘Dossier Properties’ dialog.


Example Enterprise configuration
Issue 1 -> August 20th (print channel)
Issue 2 -> Sept 4th (print channel)

We now want to ‘move’ the Dossier from ‘August 20th’ to ‘Sept 4th’.

Example 1 – Using the Planning App in Content Station

  1. Start Content Station and start the Planning app. The ‘August 20th’ and ‘Sept 4th’ issues should be listed on the left.
  2. Select the ‘Sept. 4th’ issue. The Dossier from ‘Example 1’ will be listed in the middle.
  3. Click, hold and drag the Dossier from the list in the middle to the ‘August 20th’ issue in the left hand panel. Let go of the Dossier when the ‘Issue’ listing ‘accepts’ the drag.


In the planning app show the ‘issues’ column. The issue for all of the assets will be set back to Sept 4th.

Example 2 – Finding a Dossier and changing the Issue properties

  1. Start Content Station and log in. Start the ‘Search’ app. Set the popup values to the appropriate brand and current issue of the Dossier you want to change the issue on and set the ‘object type’ popup to ‘Dossier’
  2. Find the Dossier you want to change the issue on in the list.
  3. Select the Dossier and bring up the contextual menu. Select ‘Properties’.
  4. Find the ‘Publish In’ area. Select the new Issue from the list. Press Ok.


The issue value will change for all the assets.

WoodWing Community Site