It only makes sense to call @@RenderComponentPresentation()@@
without arguments when you are iterating over a package item of type ComponentArray. This is what you are doing when you use code such as:
<!-- TemplateBeginRepeat name="Components" -->
@@RenderComponentPresentation()@@
<!-- TemplateEndRepeat -->
after using the default TBB "Extract Components From Page" further up the pipeline. In this case, the components will have been added to the array, and decorated with properties, including the ID of the component template. You can examine these properties by using the technique described here.
You can call RenderComponentPresentation()
and pass in the component ID and component template ID as parameters. Depending on what you are trying to do, it might be enough to do this in your DWT TBB.
If you really need to iterate over the components in a Template..Repeat, then you might do better to create a ComponentArray yourself and push it to the package. You can see an example of doing this here. (Note that in the example, the components are already decorated with the component template property, so in your case you'd have to do that.) Obviously the logic for determining which component template to use would depend on your particular use-case.