Component with dynamic templates (refined)