Grouping and Ungrouping Objects With the Layers Panel
As a frequent visitor to the Adobe InDesign User Forums, I often come across topics that make for interesting discussions. And sometimes I even find a brilliant InDesign "secret," like the following one which will allow you to easily control the structure of groups.
I must admit that I didn’t know about this technique before I saw it on the forums, so all credit goes to Uwe Laubender.
Adding Items to a Group
Start with any number of objects in your layout (in this example, I'm using a polygon, a circle, and a square). Then open the Layers panel. By default, you will see just one layer, called “Layer 1”. To the left of the layer name is a triangle that you can click to reveal the layer's contents. They are aptly named <polygon>, <circle>, and <square>.
Tip: you can change the names that appear in the Layers panel by clicking on them, pausing, and then clicking again.
With the three objects selected, press Command/Ctrl+G to group the objects. You will notice that there is a new sublayer called <group> and if you click the triangle beside it, you'll reveal its sublayers.
Now let's add another object to the group. Your first idea might be to just select everything and press Command/Ctrl+G again.
But if you do that, what you really have done is created a new group consisting of the <circle> and the original <group>.
This kind of nested grouping might be fine for your purposes, but for a simpler arrangement, try this:
In the Layers panel, click and drag the new object and drop in into the group. A thick black line indicates where it will be in the stacking order.
Removing Objects from a Group
You can also remove an object from a group the same way. Drag it in the Layers panel so the thick black line appears outside the group, then release the mouse button.
Creating Groups Within Groups
Creating a group nested inside another group can be a little trickier, depending on what you're working with and the group structure you want to end up with.
If you want a group consisting of existing groups, simply select the groups and group them.
You can also easily take a group and drag it inside another group in the Layers panel, the same way as shown above.
But if you want to create a subgroup from objects in an existing group, then you have to get a little creative. You can't simply select objects inside a group and press Command/Ctrl+G to make a subgroup. Instead, you could either drag those objects out of the group, group them, and then drag them back into the group. Or you could create a dummy group of two disposable objects and drag it into the main group ( just to create a subgroup structure). Then you can drag in the items you actually want in the subgroup, and finally delete the dummy objects.
So remember, when it comes to manipulating the contents of groups, the Layers panel is your best friend.