Index: template_loader.py
===================================================================
--- template_loader.py	(revision 671)
+++ template_loader.py	(working copy)
@@ -19,29 +19,34 @@
     """
     return template.Template(source)
 
+def select_template(template_name_list):
+    "Given a list of template names, returns the first that can be loaded."
+    for template_name in template_name_list:
+        try:
+            return get_template(template_name)
+        except template.TemplateDoesNotExist:
+            continue
+    # If we get here, none of the templates could be loaded
+    raise template.TemplateDoesNotExist, ', '.join(template_name_list)
+
 def render_to_string(template_name, dictionary=None, context_instance=None):
     """
     Loads the given template_name and renders it with the given dictionary as
-    context. Returns a string.
+    context. Returns a string. If the template_name contains ; it's assumed
+    that it is a list of different template names and select_template is
+    used instead of get_template.
     """
     dictionary = dictionary or {}
-    t = get_template(template_name)
+    if template_name.find(';') > 0:
+    	t = select_template(template_name.split(';'))
+    else:
+    	t = get_template(template_name)
     if context_instance:
         context_instance.update(dictionary)
     else:
         context_instance = template.Context(dictionary)
     return t.render(context_instance)
 
-def select_template(template_name_list):
-    "Given a list of template names, returns the first that can be loaded."
-    for template_name in template_name_list:
-        try:
-            return get_template(template_name)
-        except template.TemplateDoesNotExist:
-            continue
-    # If we get here, none of the templates could be loaded
-    raise template.TemplateDoesNotExist, ', '.join(template_name_list)
-
 class SuperBlock:
     "This implements the ability for {{ block.super }} to render the parent block's contents"
     def __init__(self, context, nodelist):
