Thank you very much for your answer, nico_swd, but this is not what I need to do (in fact, I knew that article

). What I need to do is to use a custom template inside other (standard) ones. For instance, you see in the example provided in that article that they include the contents of the header template just by including the $header variable. That's what I need to do, create a new template (for instance, my_template) that I can include in other templates simply by writting the variable $my_template.
I assume, I need to write a plug-in in some place to process the contents of the template and store them in that variable?