"Could we configure the Template component to execute any query and display its results? That’s basically what we do now except the query is “SELECT * FROM hpi_template” which is pretty stupid." -Todd
The use of templates are heavily restricted by essentially a hardcoded set of conditions. Can we make this more configurable so we aren't restricting ourselves to only search on the trac attribute? Looking at OpenContentTemplateService.java would be the place to look into this. Perhaps a goal would be to make this as generic and configurable as related folders.
Here is some old configuration code to help you on your way.
This first example is for declaring the global type:
<type name="Template" repoType="hpi_demo_template" extends="Document" />
This second example is the definition of the folder action:
<action beanName="templates" label="Templates" value="/templates.htm" permission="write" displayFrame="rightIframeLink"/>
NOTE: Currently hpi_template is included in the indexer module docapp, since the core module does not use a docapp of its own.
Note that related folders aren't actually as generic and configurable as we would like (yet), but in an ideal situation, we would have both be as generic and configurable as we can.