When you generate the output, it will contain just those
topics not excluded by the build expression.
If the different layouts you need are fairly constant, this
20 for one build, this 30 for another, all for yet another, you can
set up multiple layouts each pointing to different target folders.
Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.