OL Learn

Repeating elements


#1

I’m trying to format a page of labels. They have 18 labels to a sheet, 3 across by 6 down. In PP7 I used a group for each label and the line-repeat option to place them 18 to a page.
What is the Connect equivalent please? I’ve trawled the manual with no success.
Thanks for your help.


#2

In Connect

  • Create a section with dimensions equivalent to the dimensions of one label
  • Design your label
  • When you are done with the label design, create a Output Preset from File > Print Presets > Output Creation Settings
  • Make sure to select Imposition
    You will then be able to configure the desired layout in the Imposition Options page of the Output Creation wizard.
  • Open a support ticket with your example template if you have further issues.

#3

Rod
Thanks for your suggestion.
I can see that would be fine if I just needed to print n copies of something to a page, but I need to put other items on the page as well, dependent on the data.
Is there a way to way to repeat items within the page?


#4

The items on each label (text, images, barcodes…etc) can be dynamic based on the data with the above approach.

If you are no longer refering to imposition, but rather repeating elements on the same page and automatically overflow where required, then you need to insert a detail table. On the Designer menu bar, click on Insert > Table > Detail.

This is demonstrated here: Standard and Dynamic Table

If this isn’t what you are after, raise a support ticket so we can look at your request in more details.


#5

There are various ways to achieve this. One a table like Rod suggested. Alternatively create the label and store it in a snippet. Use a script to loop over your data, populate a copy of the snippet and append it to the section. See the image below for an example. Happy to share the template and datamapper, let me know.

Erik

A sample script:

var snippet = loadhtml('snippets/label.html');
for( var i = 0; i < record.tables.detail.length; i++) {
	let label = snippet.clone(); // get a clean clone of the snippet
	label.find('#').text( i+1 );
	label.find('@product@').text( record.tables.detail[i].fields['product'] );
	label.find('@notes@').text( record.tables.detail[i].fields['notes'] );
	label.find('@netweight@').text( record.tables.detail[i].fields['netweight'] + "oz" );
	results.after( label );
}

Or an optimized version where actions are performed on string and the labels are concatenated upon inserting (less actions on the section).

var labels = "";
var labelStr = loadhtml('snippets/label.html').toString();

for( var i = 0; i < record.tables.detail.length; i++) {
	var label = labelStr; // get a clean clone of the snippet
	label = label.replace('#', i + 1);
	label = label.replace('@product@', record.tables.detail[i].fields['product']);
	label = label.replace('@notes@', record.tables.detail[i].fields['notes']);
	label = label.replace('@netweight@', record.tables.detail[i].fields['netweight'] + "oz");
	labels += label;
}

results.replaceWith(labels);