Because the wrap tag identifies the place holder in the
file in loads by specific ID, it is impossible to wrap two
different elements in the same template with the same
wrapping file. The result is a duplicate ID error.
This is bug because the wrap tag was intended to be
used in the manner.
One solution to this is to expand how the wrap command
finds the placeholder command inside the wrapping file.
If the placeholder does not need to have a specific id
attribute, then it can be re-used more than once in a
single file.
Another solution (less well thought out) might also be to
provide some way for the wrap tag (and the include tag)
to re-name id attributes within its scope to a unique
name for the template. This would require a great deal
of consideration before implementing.
Another alternative would be to relax in some way the
restrictions on duplicate ids. This might cause confusion
and lead to subtle buigs where the wrong component is
found.
This is possibly related to the dynamic id issue that
Jason posted to the mailing list earlier.