Jump to content

single column/multi column question


rjay23

Recommended Posts

Is it possible to make rule that would switch composition to different text frames depending on certain conditions? I have a letter with a variably sized list in it. If the list in the letter will contain five or less items, it needs to be in a single column. If it contains more than five items, it needs to be in a three column frame.

 

I thought I can draw two frames on top of each other, making one of them 3 columns and give the frames different names. But I don't know how to proceed from there. I need to make a rule to switch to the 3 column frame if the letter will contain more than 5 list items if that's possible.

Link to comment
Share on other sites

You're on the right track with the two named overlapping frames. I don't know exactly what's in your data that controls whether "the list in the letter will contain five or less items," but you can put the same content into both frames and do something like this in OnRecordStart:

var frameToSuppress = (numListItems > 5) ? "OneColumn" : "ThreeColumn";
FindTextFrame(frameToSuppress).suppress = true;

Link to comment
Share on other sites

Dan, this is not for any project currently going ... just my mind wandering a bit with the proposed solution.

 

Is there a way to have an OVERFLOW into one frame or another based on the condition such as above? i.e. Three frames where "BaseStory" is the original frame and the frame "OneColumn" is where the overflow would occur based on the condition of 5 or less items and "ThreeColumn" if over 5 items?

 

Just wondering?

.

Link to comment
Share on other sites

Is there a way to have an OVERFLOW into one frame or another based on the condition such as above? i.e. Three frames where "BaseStory" is the original frame and the frame "OneColumn" is where the overflow would occur based on the condition of 5 or less items and "ThreeColumn" if over 5 items?

Any Body page text frame (flow) can have its own Overflow conditions, including flowing to new Overflow pages. If that primary Body page text flow is suppressed, then all Overflow pages which may have been generated for that text flow will be suppressed as well.

 

So the answer to your question is Yes. Set up two different text frames, with different Overflows, and conditionally suppress one of them. The code will be similar to what I posted above.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...