• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

InDesign Script to auto-insert pre-defined different multiple parent spreads

New Here ,
Mar 01, 2022 Mar 01, 2022

Copy link to clipboard

Copied

Hello Adobe Community,

 

I'm working on a template layout for a product-flyer that has multiple parent pages (5 categories with 4 page layouts for each category (ex. 1 Hero product, 2 Hero products, 1 hero + 4 normal products, 8 normal products). 

 

Screen Shot 2022-03-01 at 2.06.36 PM.png

 

Lets say I want to insert 5 pages from E, 6 pages from H & 11 pages from X. is there a way to script/automate this process?

 

Thanks in advance 🙂

Cherif 

TOPICS
Scripting

Views

303

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 01, 2022 Mar 01, 2022

Your team can multiselect pages in the pages panel, right click and select "Assign Parent to Page" to assign the Parent to a range of pages. If you want to do it via script, the Pages.add() function adds a page to the document, and you can specify the assigned master: 

var myDoc= app.activeDocument;
var myParentE = myDoc.masterSpreads.itemByName("E-Televisions - 1 Hero");
var myNewPage = myDoc.pages.add(LocationOptions.AT_END, undefined, {appliedMaster:myParentE});

 If you want them to be able t

...

Votes

Translate

Translate
Community Expert ,
Mar 01, 2022 Mar 01, 2022

Copy link to clipboard

Copied

Hi,

 

Just so that I understand the problem correctly, the document already has all the master pages in it?

 

And you are looking to assign those master pages to specific pages in the document, so the final document would have

- pages 1-5 - Master page E

- pages 6- 12 master page H

- pages 12 -23 master page X

 

Or have I grabbed the wrong end of the wrong stick.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 01, 2022 Mar 01, 2022

Copy link to clipboard

Copied

Yes, correct in a way. only there's no actual pages in the document to assign master pages to.


In my scenario, I want to simplify the process for my team to a wizard where they can add pages and assign different master pages to them in one go.  

 

Ex, Below I needed 1 page from A, 1 page from B, 1 page from C & 3 pages from D and I did that manualy, one master page assigning at a time. 

 

Screen Shot 2022-03-01 at 4.37.55 PM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 01, 2022 Mar 01, 2022

Copy link to clipboard

Copied

LATEST

Your team can multiselect pages in the pages panel, right click and select "Assign Parent to Page" to assign the Parent to a range of pages. If you want to do it via script, the Pages.add() function adds a page to the document, and you can specify the assigned master: 

var myDoc= app.activeDocument;
var myParentE = myDoc.masterSpreads.itemByName("E-Televisions - 1 Hero");
var myNewPage = myDoc.pages.add(LocationOptions.AT_END, undefined, {appliedMaster:myParentE});

 If you want them to be able to choose number of pages and the type of master you apply, you'd either need to hard code the selection in the script or create a script UI. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines