Before responsive websites, buckets were used to divide a page into sections. A typical design might have a Header bucket, an Inline bucket, a Sidebar bucket, and a Footer bucket. Each bucket could have any number of chunks and those chunks could be resequenced within the bucket or moved to another bucket.
The chunks in a bucket were output with a call to the built-in bucket-handler template and could be one of three types. A text/html chunk, an client or server script (any one of several media types), or a server-side include.
There is a separate template for each of the three chunk types in the xsl-library/presentation
folder.
If you needed custom HTML around each chunk you could leverage the bucket-handler's $before, $after, and $wrapper params. These were ugly and pretty limited and they assumed that every chunk in the bucket would have the same HTML before and after. Without these params chunks just had their body barfed into the bucket 🤮.