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).
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
1 Correct answer
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
...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.
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.
Copy link to clipboard
Copied
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.
![](/skins/images/EAF9F7E131C5D03B206D7C6CFC7D852B/responsive_peak/images/icon_anonymous_message.png)
![](/skins/images/EAF9F7E131C5D03B206D7C6CFC7D852B/responsive_peak/images/icon_anonymous_message.png)