I'm looking at container:: directive. It does almost what I want - wraps its content to <div>. Unfortunately container's allowed content are body elements only (paragraphs, lists, ...). I need put inside <div> also sections (and maybe other structural elements like topic or sidebar).
For example trying put section into container
.. container::
:name: my-container-id
My section title
================
causes "WARNING: Unexpected section title.".
Is there builtin or third-party directive that could contain both body and structural elements? Or am I supposed to write such directive myself?