? 806874-render-first.patch
? 877810-add-flexible.patch
? flexible_css_1.patch
? panels-add-value-to-requirements-ok.patch
? panels_ipe/TODO.txt
? plugins/layouts/flexible960
Index: plugins/display_renderers/panels_renderer_legacy.class.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/plugins/display_renderers/Attic/panels_renderer_legacy.class.php,v
retrieving revision 1.1.2.16
diff -u -p -r1.1.2.16 panels_renderer_legacy.class.php
--- plugins/display_renderers/panels_renderer_legacy.class.php	26 Jul 2010 19:44:29 -0000	1.1.2.16
+++ plugins/display_renderers/panels_renderer_legacy.class.php	12 Aug 2010 20:58:53 -0000
@@ -85,8 +85,7 @@ class panels_renderer_legacy {
     // First, render all the panes into little boxes. We do this here because
     // some panes request to be rendered after other panes (primarily so they
     // can do the leftovers of forms).
-    $panes = array();
-    $later = array();
+    $panes = $first = $normal = $last = array();
 
     foreach ($this->display->content as $pid => $pane) {
       $pane->shown = !empty($pane->shown); // guarantee this field exists.
@@ -95,18 +94,24 @@ class panels_renderer_legacy {
         continue;
       }
 
-      // If this pane wants to render last, add it to the $later array.
       $content_type = ctools_get_content_type($pane->type);
 
+      // If this pane wants to render last, add it to the $last array. We allow
+      // this because some panes need to be rendered after other panes,
+      // primarily so they can do things like the leftovers of forms.
       if (!empty($content_type['render last'])) {
-        $later[$pid] = $pane;
-        continue;
+        $last[$pid] = $pane;
+      }
+      else if (!empty($content_type['render first '])) {
+        $first[$pid] = $pane;
+      }
+      // Otherwise, render it in the normal order.
+      else {
+        $normal[$pid] = $pane;
       }
-
-      $panes[$pid] = $this->render_pane($pane);
     }
 
-    foreach ($later as $pid => $pane) {
+    foreach (($first + $normal + $last) as $pid => $pane) {
       $panes[$pid] = $this->render_pane($pane);
     }
 
Index: plugins/display_renderers/panels_renderer_standard.class.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/plugins/display_renderers/Attic/panels_renderer_standard.class.php,v
retrieving revision 1.1.2.24
diff -u -p -r1.1.2.24 panels_renderer_standard.class.php
--- plugins/display_renderers/panels_renderer_standard.class.php	26 Jul 2010 21:24:22 -0000	1.1.2.24
+++ plugins/display_renderers/panels_renderer_standard.class.php	12 Aug 2010 20:58:54 -0000
@@ -185,7 +185,7 @@ class panels_renderer_standard {
   function prepare_panes($panes) {
     ctools_include('content');
     // Use local variables as writing to them is very slightly faster
-    $normal = $last = array();
+    $first = $normal = $last = array();
 
     // Prepare the list of panes to be rendered
     foreach ($panes as $pid => $pane) {
@@ -198,20 +198,23 @@ class panels_renderer_standard {
         }
       }
 
-      $ct_plugin_def = ctools_get_content_type($pane->type);
+      $content_type = ctools_get_content_type($pane->type);
 
       // If this pane wants to render last, add it to the $last array. We allow
       // this because some panes need to be rendered after other panes,
       // primarily so they can do things like the leftovers of forms.
-      if (!empty($ct_plugin_def['render last'])) {
+      if (!empty($content_type['render last'])) {
         $last[$pid] = $pane;
       }
+      else if (!empty($content_type['render first '])) {
+        $first[$pid] = $pane;
+      }
       // Otherwise, render it in the normal order.
       else {
         $normal[$pid] = $pane;
       }
     }
-    $this->prepared['panes'] = $normal + $last;
+    $this->prepared['panes'] = $first + $normal + $last;
     return $this->prepared['panes'];
   }
 
