Create a tag file in Supermodel
Format the tag content like this, and include any relevant attributes:
<%@tag %>
<%@include file="/WEB-INF/templates/frag/global.jspf" %>
<%@attribute name="object" required="true" rtexprvalue="true" type="java.lang.Object" %>
<%@attribute name="something" required="false" rtexprvalue="true" type="java.lang.String" %>
<%@attribute name="test" required="false" rtexprvalue="true" type="java.lang.Boolean" %>
[ ... tag template code here, e.g. <sm:out name="something" /> ]
Use sm:include for blocks of content
E.g. Store templates for each content type in /object/block/ and then add into main page like this:
<sm:include field="blocks" page="/object/block/default" />
This will iterate through all the objects in your collection and output the content using the matching template found in the folder specified by the page attribute.
You can optionally pass attributes which will be used by the includded file, which means includes may be used instead of tags in some cases:
<sm:include field="blocks" page="/object/block/default">
<sm:attribute name="mycontent" value="..." />
</sm:include>